jpountz commented on PR #927: URL: https://github.com/apache/lucene/pull/927#issuecomment-1145723686
> To let the user know about the partial result, I was thinking to modify TotalHits.Relation Letting users know whether results are partial via the `TotalHits.Relation` could work for top-docs queries, but what about faceting collectors and custom collectors? > I don't think the exitable parameter is applicable to this - this does not use ExitableDirectoryReader It doesn't yet but IMO it should eventually automatically wrap readers with `ExitableFilterAtomicReader` when a timeout is set to be able to abort queries while they are doing rewrites against terms dictionaries, vector search, or computing giant bit sets that match a range query. > thoughts on asking the user to specify the timeout as a future point-in-time where the search will be halted (as you're suggesting above) vs. allowing the user to specify the amount of time they want to allow searches to run I haven't thought through it deeply, but it felt like it could handle more use-cases properly, e.g. if you are running a distributed search, the search would fan out to shards, and there might be some networking and queueing involved. The time that matters to users is the total time of the query, not the time it takes for shards. So the counter should start when the node that coordinates the search request receives the request. It's doable with a timeout, but it requires logic at the shard level to subtract time spent on the network or waiting in queues. With a halt time, you could compute the halt time on the coordinating node, pass it to shards, use this halt time directly on IndexSearchers and it will automatically account for time spent over the network or in queues. It might also help with use-cases that require running multiple queries under the hood to power a single logical query from the end user perspective as the time that matters in that case is not the time of individual queries but their sum? -- 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