+1 I like this as well. Thanks for the suggestion! If IndexSearcher is aware of timeouts, I think it can "do the right thing" with respect to caching as well as properly establish the right "Relation" in "TotalHits" if it times out (maybe there's some callback or something allowing IndexSearcher to report a timeout to collectors / collector managers?).
I went ahead and created an issue to explore this further: https://issues.apache.org/jira/browse/LUCENE-10151 Thanks again! -Greg On Tue, Oct 5, 2021 at 8:20 AM Michael McCandless <[email protected]> wrote: > > On Tue, Oct 5, 2021 at 11:13 AM Adrien Grand <[email protected]> wrote: > >> Maybe one clean way to make it happen would be to make timeouts an >> IndexSearcher feature. Whenever a timeout is set, IndexSearcher could split >> the doc ID space into ranges of X docs and check the timeout between every >> range. This way, the CollectionTerminatedException wouldn't be raised by a >> query, IndexSearcher would be in full control of terminating the query >> prematurely based on the configured timeout. > > > +1, I like this idea! It'd make timeouts more of a first class feature, and > then the overhead should be very small if we check only after each block of > partitioned docid space. > > Mike McCandless > > http://blog.mikemccandless.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
