Elastic Search: failed to create query: field expansion matches too many fields, limit: 1024, got: 1399

Post Reply
User avatar
isscbta
Team Member
Posts: 138
Joined: Mon Jul 19, 2021 1:41 am
Has thanked: 17 times
Been thanked: 3 times

In case you got this error with the elastic search:
{"error":{"root_cause":[{"type":"query_shard_exception","reason":"failed to create query: field expansion matches too many fields, limit: 1024, got: 1399","index_uuid":"-MDwzeJbSguZI19YAsyiHQ","index":"toprc_24_searchdefault_product_idx1"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"toprc_24_searchdefault_product_idx1","node":"GGvYGRptQ2W6FQ50XO_W4w","reason":{"type":"query_shard_exception","reason":"failed to create query: field expansion matches too many fields, limit: 1024, got: 1399","index_uuid":"-MDwzeJbSguZI19YAsyiHQ","index":"toprc_24_searchdefault_product_idx1","caused_by":{"type":"illegal_argument_exception","reason":"field expansion matches too many fields, limit: 1024, got: 1399"}}}]},"status":400}
To fix this, in your SSH, as root, run:

Code: Select all

mcedit /etc/elasticsearch/elasticsearch.yml
At the end of file, add this:

Code: Select all

indices.query.bool.max_clause_count: 4096
In the end, run:

Code: Select all

systemctl restart elasticsearch

Tags:
Post Reply