Too_many_clauses: maxClauseCount is set to 1337

Hello,

i'm getting the this error:

ApiError(500, 'search_phase_execution_exception', 'too_many_clauses: maxClauseCount is set to 1337')

The query that is use is:

{
	"bool": {
		"filter": [
			{
				"term": {
					"filter1": value1
				}
			},
			{
				"term": {
					"filter2": value2
				}
			}
		],
		"should": [
			{
				"match": {
					"text": {
						"fuzziness": 2,
						"query": my_query 
					}
				}
			}
		]
	}
}

my_query is ~100 words, and the index that is searched has ~80k documents.
The Elastic version is 8.4.1

Any advice on what to do in this scenario?

Thanks in advance

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