[ https://issues.apache.org/jira/browse/LUCENE-10544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17540309#comment-17540309 ]
Greg Miller edited comment on LUCENE-10544 at 5/20/22 10:03 PM: ---------------------------------------------------------------- As I understood Adrien's suggestion, I think the idea is to create a new {{BulkScorer}} sub-class that would wrap another {{BulkScorer}} (provided as {{in}} in Adrien's code snippet). This class would override the {{score}} method as Adrien shows above to periodically check timeouts, but otherwise just delegate to {{in}} if the query has not yet timed out. I imagine somewhere in {{IndexSearcher}} you would instantiate this new "timeout enforcing bulk scorer", wrapping the {{BulkScorer}} provided by the query's weight. Does that help? Also, can I request that we move this conversation over to [LUCENE-10151|https://issues.apache.org/jira/browse/LUCENE-10151]? This issue is really about modifying {{ExitableTermsEnum}}, which we may want to eventually due independent of adding timeout support to {{IndexSearcher}}. Since this discussion is really about adding timeout support to {{IndexSearcher}}, it would be best to capture the conversation in LUCENE-10151 to make it easier to dig up in the future. Thank you! was (Author: gsmiller): As I understood Adrien's suggestion, I think the idea is to create a new {{BulkScorer}} sub-class that would wrap another {{BulkScorer}} (provided as {{in}} in Adrien's code snippet). This class would override the {{score}} method as Adrien shows above to periodically check timeouts, but otherwise just delegate to {{in}} if the query has not yet timed out. I image somewhere in {{IndexSearcher}} you would instantiate this new "timeout enforcing bulk scorer", wrapping the {{BulkScorer}} provided by the query's weight. Does that help? Also, can I request that we move this conversation over to [LUCENE-10151|https://issues.apache.org/jira/browse/LUCENE-10151]? This issue is really about modifying {{ExitableTermsEnum}}, which we may want to eventually due independent of adding timeout support to {{IndexSearcher}}. Since this discussion is really about adding timeout support to {{IndexSearcher}}, it would be best to capture the conversation in LUCENE-10151 to make it easier to dig up in the future. Thank you! > Should ExitableTermsEnum wrap postings and impacts? > --------------------------------------------------- > > Key: LUCENE-10544 > URL: https://issues.apache.org/jira/browse/LUCENE-10544 > Project: Lucene - Core > Issue Type: Bug > Components: core/index > Reporter: Greg Miller > Priority: Major > > While looking into options for LUCENE-10151, I noticed that > {{ExitableDirectoryReader}} doesn't actually do any timeout checking once you > start iterating postings/impacts. It *does* create a {{ExitableTermsEnum}} > wrapper when loading a {{{}TermsEnum{}}}, but that wrapper doesn't do > anything to wrap postings or impacts. So timeouts will be enforced when > moving to the "next" term, but not when iterating the postings/impacts > associated with a term. > I think we ought to wrap the postings/impacts as well with some form of > timeout checking so timeouts can be enforced on long-running queries. I'm not > sure why this wasn't done originally (back in 2014), but it was questioned > back in 2020 on the original Jira SOLR-5986. Does anyone know of a good > reason why we shouldn't enforce timeouts in this way? > Related, we may also want to wrap things like {{seekExact}} and {{seekCeil}} > given that only {{next}} is being wrapped currently. -- This message was sent by Atlassian Jira (v8.20.7#820007) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org