-
Notifications
You must be signed in to change notification settings - Fork 25.2k
FunctionScoreQuery have a direct reference to QueryShardContext #73925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Pinging @elastic/es-search (Team:Search) |
One additional comment here is whether we should allow FunctionScoreQuery to be cached. They are meant to produce a score so seeing them in the query cache would be surprising. |
I think we have two options here:
Note that we already have some tests for whether or not this is cacheable at the request layer, but that checks for things like whether |
This commit disables the query cache for the `FunctionScoreQuery` and the `ScriptScoreQuery`. These queries are not meant to be cached. If the score is not needed, we'll now cache the sub-query and filters independently since we don't want to keep an unused script in the cache. Closes elastic#73925
This commit disables the query cache for the `FunctionScoreQuery` and the `ScriptScoreQuery`. These queries are not meant to be cached. If the score is not needed, we'll now cache the sub-query and filters independently since we don't want to keep an unused script in the cache. Closes #73925
This commit disables the query cache for the `FunctionScoreQuery` and the `ScriptScoreQuery`. These queries are not meant to be cached. If the score is not needed, we'll now cache the sub-query and filters independently since we don't want to keep an unused script in the cache. Closes #73925
This commit disables the query cache for the `FunctionScoreQuery` and the `ScriptScoreQuery`. These queries are not meant to be cached. If the score is not needed, we'll now cache the sub-query and filters independently since we don't want to keep an unused script in the cache. Closes #73925
Uh oh!
There was an error while loading. Please reload this page.
FunctionScoreQuery
can be cached on a per-segment basis in the Lucene query cache. However a recent refactoring made them depend on theQueryShardContext
so the query cache can now keep references to old index readers.That should be considered as a leak since this memory is not taken into account in the cache size.
The text was updated successfully, but these errors were encountered: