sijuv commented on code in PR #2960:
URL: https://github.com/apache/solr/pull/2960#discussion_r1932766821


##########
solr/core/src/java/org/apache/solr/search/QueryResult.java:
##########
@@ -22,6 +22,7 @@ public class QueryResult {
   // Object for back compatibility so that we render true not "true" in json
   private Object partialResults;
   private Boolean segmentTerminatedEarly;

Review Comment:
   I think we need to distinguish the 2 because the cause for them is different 
. segmentTerminateEarly could occur because of the searcher not proceeding on a 
sorted segment because the remaning docs are of lower _score_. The 
terminateEarly is purely due to the searcher running past the provided number 
of maxHits. As a user if I see terminateEarly then I know I might need to 
increase the maxHits parameter. 



##########
solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java:
##########
@@ -338,6 +339,11 @@ private Collector buildAndRunCollectorChain(
       if (cmd.isQueryCancellable()) {
         
core.getCancellableQueryTracker().removeCancellableQuery(cmd.getQueryID());
       }
+      if (collector instanceof final EarlyTerminatingCollector 
earlyTerminatingCollector) {

Review Comment:
   done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to