Multi_match, too_many_clauses: maxClauseCount is set to 1024

Hi support,
I run this query, but get error:too_many_clauses: maxClauseCount is set to 1024, anyone help? thanks

{"query":{
"multi_match" : {
"query" : "e2",
"fields" : ["id", "name" ],
"type" : "phrase_prefix",
"max_expansions" : 50000,
"lenient" : true
}
}}

Hi @Derrick,

max_expansions is incredibly high and you should reduce it significantly or just use the default value.

You can read more about it in the section"Search as you Type" in the Definitive Guide.

Daniel

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