Govind Balaji S
Govind Balaji S
`AbstractMultiTermQueryConstantScoreWrapper` itself only calls `Query#createWeight`. However, `ConstantScoreQuery#createWeight` and `BooleanQuery#createWeight` call `IndexSearcher#createWeight`. We might have to change a lot of places this way. > To your point, there are many segments,...
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...
One hack I can think of is that instead of `searcher` here, we send in a decorator of `searcher` with `IndexSearcher#createWeight(query)` just doing `query.createWeight()`. Then these per segment rewrites would...
Thanks @jpountz! Have put up a PR for this - [Fix segment-specific TermInSetQuery rewrites thrashing caching policy #15441](https://github.com/apache/lucene/pull/15441)