gsmiller commented on a change in pull request #217:
URL: https://github.com/apache/lucene/pull/217#discussion_r675059243



##########
File path: 
lucene/facet/src/java/org/apache/lucene/facet/DrillSidewaysScorer.java
##########
@@ -195,11 +195,8 @@ private void doQueryFirstScoring(Bits acceptDocs, 
LeafCollector collector, DocsA
 
       collectDocID = docID;

Review comment:
       I was thinking about this a little more and wanted to see what you 
thought about a slightly different approach. Full disclosure, I’ve been away 
from my computer for a day and am on my phone right now, so I haven’t looked 
into this as deeply as I’d like. 
   
   It looks to me, when doing “query first scoring”, that the ScoreAndDoc 
wrapper is essentially useless. The baseScorer will be positioned on the 
“collectDoc” whenever it collects a full hit or near miss. Can’t we just pass 
baseScorer into the collectors (via setScorer) when doing queryFirstScoring and 
avoid using a ScoreAndDoc instance completely? That would also allow the score 
to be lazily evaluated since the collectors would just be calling into 
baseScorer directly if they need the score. If I remember correctly, there’s a 
caching scorer wrapper we could use here as well to ensure the score is only 
computed once in the case that multiple drill sideways collectors call back for 
the score. 
   
   Like I said, I’m on my phone and haven’t been able to try this out at all, 
so maybe it’s completely flawed for some reason. But maybe you could have a 
look and see if something along these lines would work?
   
   Thanks again for taking this on!




-- 
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...@lucene.apache.org

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



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

Reply via email to