[
https://issues.apache.org/jira/browse/LUCENE-10151?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Greg Miller updated LUCENE-10151:
---------------------------------
Description:
I'd like to explore adding optional "timeout" capabilities to
{{IndexSearcher}}. This would enable users to (optionally) specify a maximum
time budget for search execution. If the search "times out", partial results
would be available.
This idea originated on the dev list (thanks [~jpountz] for the suggestion).
Thread for reference:
[http://mail-archives.apache.org/mod_mbox/lucene-dev/202110.mbox/%3CCAL8PwkZdNGmYJopPjeXYK%3DF7rvLkWon91UEXVxMM4MeeJ3UHxQ%40mail.gmail.com%3E]
A couple things to watch out for with this change:
# We want to make sure it's robust to a two-phase query evaluation scenario
where the "approximate" step matches a large number of candidates but the
"confirmation" step matches very few (or none). This is a particularly tricky
case.
# We want to make sure the {{TotalHits#Relation}} reported by {{TopDocs}} is
{{GREATER_THAN_OR_EQUAL_TO}} if the query times out
# We want to make sure it plays nice with the {{LRUCache}} since it iterates
the query to pre-populate a {{BitSet}} when caching. That step shouldn't be
allowed to overrun the timeout. The proper way to handle this probably needs
some thought.
was:
I'd like to explore adding optional "timeout" capabilities to
{{IndexSearcher}}. This would enable users to (optionally) specify a maximum
time budget for search execution. If the search "times out", partial results
would be available.
This idea originated on the dev list (thanks [~jpountz] for the suggestion).
Thread for reference:
[http://mail-archives.apache.org/mod_mbox/lucene-dev/202110.mbox/%3CCAL8PwkZdNGmYJopPjeXYK%3DF7rvLkWon91UEXVxMM4MeeJ3UHxQ%40mail.gmail.com%3E]
> Add timeout support to IndexSearcher
> ------------------------------------
>
> Key: LUCENE-10151
> URL: https://issues.apache.org/jira/browse/LUCENE-10151
> Project: Lucene - Core
> Issue Type: Improvement
> Components: core/search
> Reporter: Greg Miller
> Priority: Minor
>
> I'd like to explore adding optional "timeout" capabilities to
> {{IndexSearcher}}. This would enable users to (optionally) specify a maximum
> time budget for search execution. If the search "times out", partial results
> would be available.
> This idea originated on the dev list (thanks [~jpountz] for the suggestion).
> Thread for reference:
> [http://mail-archives.apache.org/mod_mbox/lucene-dev/202110.mbox/%3CCAL8PwkZdNGmYJopPjeXYK%3DF7rvLkWon91UEXVxMM4MeeJ3UHxQ%40mail.gmail.com%3E]
>
> A couple things to watch out for with this change:
> # We want to make sure it's robust to a two-phase query evaluation scenario
> where the "approximate" step matches a large number of candidates but the
> "confirmation" step matches very few (or none). This is a particularly tricky
> case.
> # We want to make sure the {{TotalHits#Relation}} reported by {{TopDocs}} is
> {{GREATER_THAN_OR_EQUAL_TO}} if the query times out
> # We want to make sure it plays nice with the {{LRUCache}} since it iterates
> the query to pre-populate a {{BitSet}} when caching. That step shouldn't be
> allowed to overrun the timeout. The proper way to handle this probably needs
> some thought.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]