GovindBalaji-S-Glean commented on issue #14986: URL: https://github.com/apache/lucene/issues/14986#issuecomment-3132103725
Thanks for looking into this. It looks like `AbstractMultiTermQueryConstantScoreWrapper` already does create the weights directly without involving the IndexSearcher - https://github.com/apache/lucene/blob/46a4fee65580a35a39b1fb4d04a5d87b3ec7d1f2/lucene/core/src/java/org/apache/lucene/search/AbstractMultiTermQueryConstantScoreWrapper.java#L166 However, the `q` here is a `ConstantScoreQuery composing a BooleanQuery composing multiple TermQuery`. So, even if AbstractMultiTermQueryConstantScoreWrapper does not involve the cache, `ConstantScoreQuery` and `BooleanQuery` end up doing: https://github.com/apache/lucene/blob/46a4fee65580a35a39b1fb4d04a5d87b3ec7d1f2/lucene/core/src/java/org/apache/lucene/search/ConstantScoreQuery.java#L136 and https://github.com/apache/lucene/blob/46a4fee65580a35a39b1fb4d04a5d87b3ec7d1f2/lucene/core/src/java/org/apache/lucene/search/BooleanWeight.java#L56-L60 The above two involving the cache doesn't look wrong to me since we expect subqueries of a boolean query also to be cached. I am not sure if we can or want to pass any thing down to these ConstantScoreQuery (or BooleanQuery) such that they don't involve their wrapped (or subqueries) through the cache. Am I missing something else we can fix in `AbstractMultiTermQueryConstantScoreWrapper` here? -- 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