msfroh commented on issue #12032:
URL: https://github.com/apache/lucene/issues/12032#issuecomment-1763058013

   I was looking into this, and the fundamental problem seems to be that the 
underlying drillsideways scoring implementations (`doQueryFirstScoring`, 
`doDrillDownAdvanceScoring`, and `doUnionScoring`) each assume that they're 
going to score through the whole segment (such that they don't play nicely with 
query timeout).
   
   `doDrillDownAdvanceScoring` and `doUnionScoring` both explicitly set:
   ```
   final int maxDoc = context.reader().maxDoc();
   ```
   
   While `doQueryFirstScoring` and the special-case 
`doQueryFirstScoringSingleDim` both have `while` loops that finish once there 
are no more docs:
   
   ```
   while (docID != DocIdSetIterator.NO_MORE_DOCS) {
   ```
   
   So, the exception there is probably not such a bad idea because 
DrillSidewaysScorer *doesn't* seem to play nicely with `TimeLimitingBulkScorer` 
-- at least it doesn't honor the `maxDoc` override that 
`TimeLimitingBulkScorer` imposes.
   
   On the other hand, maybe we could just pass `maxDoc` through to the 
underlying implementations. @gsmiller, do you know if there's any danger from 
terminating `DrillSidewaysScorer` before hitting the end of a segment?


-- 
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