Elastic Cloud - How to fix "number of fields exceeds the automatic field expansion limit"


On Elastic Cloud 6.7 and 6.8 I get the above warning when running the 7.0 upgrade assistant. How do I solve this?

I found you can set indices.query.bool.max_clause_count but Elastic Cloud does not allow modifying that value.


This index has [2409] fields, which exceeds the automatic field expansion limit of 1024 and does not have [index.query.default_field] set, which may cause queries which use automatic field expansion, such as query_string, simple_query_string, and multi_match to fail if fields are not explicitly specified in the query.

This page makes it sounds like you can change it if needed - Search settings | Elasticsearch Guide [7.15] | Elastic.

This setting limits the number of clauses a Lucene BooleanQuery can have. The default of 1024 is quite high and should normally be sufficient. This limit does not only affect Elasticsearchs bool query, but many other queries are rewritten to Lucene’s BooleanQuery internally. The limit is in place to prevent searches from becoming to large and taking up too much CPU and memory. In case you consider to increase this setting, make sure you exhausted all other options to avoid having to do this. Higher values can lead to performance degradations and memory issues, especially in clusters with a high load or few resources.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.