Skip to content

Commit

Permalink
SOLR-17447 : Support for maxHitsPerShard.
Browse files Browse the repository at this point in the history
rename parameter to maxHits
  • Loading branch information
Siju Varghese committed Jan 9, 2025
1 parent 7995cb1 commit 36ee8bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@ public Object reduce(Collection collectors) throws IOException {
var4.hasNext();
maxScore = Math.max(maxScore, collector.getMaxScore())) {
Collector next = (Collector) var4.next();
if (next instanceof EarlyTerminatingCollector) {
EarlyTerminatingCollector earlyTerminatingCollector = (EarlyTerminatingCollector) next;
if (next instanceof final EarlyTerminatingCollector earlyTerminatingCollector) {
next = earlyTerminatingCollector.getDelegate();
}
collector = (MaxScoreCollector) next;
Expand Down Expand Up @@ -339,9 +338,7 @@ public Object reduce(Collection collectors) throws IOException {
Collector collector;
for (Object o : collectors) {
collector = (Collector) o;
if (collector instanceof EarlyTerminatingCollector) {
EarlyTerminatingCollector earlyTerminatingCollector =
(EarlyTerminatingCollector) collector;
if (collector instanceof final EarlyTerminatingCollector earlyTerminatingCollector){
collector = earlyTerminatingCollector.getDelegate();
}
if (collector instanceof TopDocsCollector) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ public interface CommonParams {
*/
String MEM_ALLOWED = "memAllowed";

/** The max hits to be collected per shard */
String MAX_HITS_PER_SHARD = "maxHitsPerShard";
/** The max hits to be collected per shard.*/
String MAX_HITS_PER_SHARD = "maxHits";

/** Is the query cancellable? */
String IS_QUERY_CANCELLABLE = "canCancel";
Expand Down

0 comments on commit 36ee8bb

Please sign in to comment.