After our initial migration from ES 2 to 5, one major issue that we faced was that the term queries were very slow in comparison to ES 2.
I had raised a GtitHub issue https://github.com/elastic/elasticsearch/issues/23343 and after jpountz pointed me to the below property, then our performance improved.
I see the following code in ES source at core/src/main/java/org/elasticsearch/index/IndexModule.java: 107
// This setting is an escape hatch in case not caching term queries would slow some users down // Do not document. public static final Setting<Boolean> INDEX_QUERY_CACHE_TERM_QUERIES_SETTING = Setting.boolSetting("index.queries.cache.term_queries", false, Property.IndexScope);
I'm only concerned that since this is not documented, that it may end up being removed in the future ES.
We have more than 200 million documents and our majority (99%) of the tasks are term queries only. Could someone please consider to document this support and maintain it in future ES as well.