Skip to content

Conversation

@jimczi
Copy link
Contributor

@jimczi jimczi commented Oct 31, 2017

We have an hidden setting called index.queries.cache.term_queries that disables caching of term queries in the query cache.
Though term queries are not cached in the Lucene UsageTrackingQueryCachingPolicy since version 6.5.
This makes the es policy useless but also makes it impossible to re-enable caching for term queries.
This change appeared in Lucene 6.5 so this setting is no-op since version 5.4 of Elasticsearch
The change in this PR removes the setting and the custom policy.

For 7 I think it's ok to remove the setting but I don't know what to do for 5.6 and 6.x. Re-enabling the ability to cache term queries is tricky and would require to fork the Lucene UsageTrackingQueryCachingPolicy which is why I marked this PR with the discuss label.

We have an hidden setting called `index.queries.cache.term_queries` that disables caching of term queries in the query cache.
Though term queries are not cached in the Lucene UsageTrackingQueryCachingPolicy since version 6.5.
This makes the es policy useless but also makes it impossible to re-enable caching for term queries.
This change appeared in Lucene 6.5 so this setting is no-op since version 5.4 of Elasticsearch
The change in this PR removes the setting and the custom policy.
@jpountz
Copy link
Contributor

jpountz commented Oct 31, 2017

Good catch!

This setting was undocumented on purpose, we do not allow users to configure what queries can be cached in general. So I don't think there is anything to do besides removing the setting and ElasticsearchQueryCachingPolicy in 6.x and master?

@jimczi jimczi merged commit 429275a into elastic:master Nov 6, 2017
@jimczi jimczi deleted the term_query_cache branch November 6, 2017 07:26
jimczi added a commit that referenced this pull request Nov 6, 2017
We have an hidden setting called `index.queries.cache.term_queries` that disables caching of term queries in the query cache.
Though term queries are not cached in the Lucene UsageTrackingQueryCachingPolicy since version 6.5.
This makes the es policy useless but also makes it impossible to re-enable caching for term queries.
This change appeared in Lucene 6.5 so this setting is no-op since version 5.4 of Elasticsearch
The change in this PR removes the setting and the custom policy.
martijnvg added a commit that referenced this pull request Nov 6, 2017
* 6.x:
  test: Break apart the multi type aspect of rolling upgrade tests,
  Upgrade to Jackson 2.8.10 (#27230)
  [Docs] Fix minor paragraph indentation error for multiple Indices params (#25535)
  Fix inconsistencies in the rest api specs for `tasks` (#27163)
  Adjust RestHighLevelClient method modifiers (#27238)
  Add more information on `_failed_to_convert_` exception (#27034)
  Remove ElasticsearchQueryCachingPolicy (#27190)
  Backport the size-based index rollver to v6.1.0
  Add size-based condition to the index rollover API (#27160)
  Remove the single argument Environment constructor (#27235)
  Fix RestGetAction name typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants