2

I am using elasticserach and got the following error:

'too_many_clauses: maxClauseCount is set to 1024'

Please find my code below:

{"query": {
  "bool": {
   "must": [
    {
      "query_string": {
        "default_field": "education.title",
        "query": data
     }
   }]
  }
}

'data' is a string of 4500 request:

(University~ AND of~ AND Vilnius~) OR (Vilnius~ AND Higher~ AND School~) OR ... OR (Kaunas~ AND Secondary~ AND School~) (and the whole list is made of 4500 like these)

Any possible sollutions? I've read that around that filtering would help, but still I didn't solve this error.

Really appreciate your help a lot!

BC1554
  • 137
  • 2
  • 11

1 Answers1

0

In Elasticsearch 5 "index.query.bool.max_clause_count" has been deprecated. Insert in your elasticsearch.yml file "indices.query.bool.max_clause_count : n" instead (where n - new supported number of cluses) https://www.elastic.co/guide/en/elasticsearch/reference/5.0/breaking_50_settings_changes.html#_search_settings is link to documentation

also refer Elasticsearch - set max_clause_count for more details

eagle
  • 312
  • 1
  • 13
  • 1
    thanks for that. However, I am not allowed to do changes for .yml as it would affect production. I look for a solution via filters. Thank you anyway. – BC1554 Dec 04 '18 at 09:57