vigyasharma commented on issue #11676:
URL: https://github.com/apache/lucene/issues/11676#issuecomment-1295746869

   I would like to help out with this one..
   
   > Could we grow the window of scored doc IDs exponentially, maybe with 
guarantees such as making sure that the new window is at most 50% of doc IDs 
that have been scored so far so that this exponential growth could only exceed 
the configured timeout by 50%
   
   With the fixed interval (=100 today), we might exceed query timeout by the 
time taken to process 100 docs (worst case) - (if we checked for 
`queryTimeout.shouldExit()` right before timeout). With an increasing window 
size, this delay can obviously increase, which, as you pointed out, needs to be 
addressed.
   
   My initial thoughts are that we grow the interval (by 50%), only if the time 
remaining until queryTimeout, is more than the time it took to process the last 
interval size. As soon as this is no longer true, we default back to an 
interval size of 100. This will keep the shrinking-back part simple, and retain 
our present day worst case timeout breach scenario.
   
   Let me know if this makes sense, and I'll start working on a PR for the 
change.


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