You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "msfroh (via GitHub)" <gi...@apache.org> on 2023/10/14 17:27:45 UTC

Re: [I] Exception rising while using QueryTimeout [lucene]

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

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


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