jpountz commented on PR #11875:
URL: https://github.com/apache/lucene/pull/11875#issuecomment-1305387673

   Historically configuring timeouts on searches has been too complicated: 
users had to wrap their collector with a `TimeLimitingCollector` and to wrap 
their readers with an `ExitableDirectoryReader` in order to make sure that 
other phases of searches like rewrites, collecting matching points into a 
bitset or vector searches would also honor the timeout. And I would bet that 
many users don't even know that they need to do both for timeouts to be applied 
correctly.
   
   So in #927 we added a more user-friendly `IndexSearcher#setTimetout` with 
the idea that it would do the right thing automatically. For now it only 
supports aborting searches at collection time, but there are open follow-ups to 
make it better:
    - #11676
    - #11677
    - #11700
   
   When these issues are addressed, I'm hoping to deprecate 
`TimeLimitingCollector` and update javadocs of `ExitableDirectoryReader` to 
make it clear that it's a very expert class that is only useful when consuming 
index readers directly as opposed to through an `IndexSearcher`.
   
   Like `TimeLimitingCollector` and `ExitableDirectoryReader`, 
`TimeLimitingBulkScorer` is a low-level implementation detail for timeout 
support, that I think of as something that should remain private. I can be 
convinced to make it public but I would like to understand what are the 
use-cases that need to leverage this `TimeLimitingBulkScorer` directly as 
opposed to leveraging `IndexSearcher`'s built-in timeout support.


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