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


##########
solr/core/src/java/org/apache/solr/search/EarlyTerminatingCollector.java:
##########
@@ -29,11 +30,15 @@
  */
 public class EarlyTerminatingCollector extends FilterCollector {
 
+  private final int chunkSize = 100; // Check across threads only at a chunk 
size
+
   private final int maxDocsToCollect;
 
   private int numCollected = 0;
   private int prevReaderCumulativeSize = 0;
   private int currentReaderSize = 0;
+  private final AtomicInteger pendingDocsToCollect;

Review Comment:
   Chunking we will still need. LongAdder add does not return the current count 
and doing increment and then get on every document I don't think will be 
optimal.



##########
solr/core/src/java/org/apache/solr/search/MultiThreadedSearcher.java:
##########
@@ -255,7 +265,11 @@ public Object reduce(Collection collectors) throws 
IOException {
       for (Iterator var4 = collectors.iterator();
           var4.hasNext();
           maxScore = Math.max(maxScore, collector.getMaxScore())) {
-        collector = (MaxScoreCollector) var4.next();
+        Collector next = (Collector) var4.next();

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