mayya-sharipova commented on a change in pull request #1351: LUCENE-9280: 
Collectors to skip noncompetitive documents
URL: https://github.com/apache/lucene-solr/pull/1351#discussion_r394663323
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/search/Weight.java
 ##########
 @@ -249,6 +249,10 @@ static int scoreRange(LeafCollector collector, 
DocIdSetIterator iterator, TwoPha
      *  See <a 
href="https://issues.apache.org/jira/browse/LUCENE-5487";>LUCENE-5487</a> */
     static void scoreAll(LeafCollector collector, DocIdSetIterator iterator, 
TwoPhaseIterator twoPhase, Bits acceptDocs) throws IOException {
       if (twoPhase == null) {
+        if (collector.iterator() != null) {
 
 Review comment:
   @jimczi Thanks for the initial review.   
   
   >  I wonder how this would look like if we build a conjunction from the main 
query and the collector iterator directly when building the weight (in 
IndexSearcher) 
   
   I could not think of any clever way  to do this in `IndexSearcher`,  I would 
appreciate your help if you can suggest any such way.
   
   I looked at classes that override `BulkScorer` and many of them still refer 
to a default `BulkScorer`, and for those that don't such as `BooleanScorer` I 
found its logic to be too complex to combine with  a collector's iterator. 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to