Elasticsearch 7.7 : field expansion matches too many fields, limit: 1024, got: 1139

Hi,
I am using ES 7.7 and indexed around 70K data. I also verified index has around 540 fields by invokinghttp://es_host:port/2/_mapping.

While performing simple search query I am getting query_shard_exception.

    GET http://es_host:port/2/_search?q=*
    Response:
    {
      "root_cause" : [
      {
    	"type" : "query_shard_exception",
    	"reason" : "failed to create query: field expansion matches too many fields, limit: 1024, got: 1139"
      }
    }

Same error I am facing for query having bool must clause which has only 3 terms.
I was using ES 5.5.3 earlier and did not face this issue and only getting after migrated to ES 7.7

Queries:

  1. Why am I getting this error ? How to resolve above issue ?
  2. If solution is to specify indices.query.bool.max_clause_count then what should be the max allowed value? [my fields are dynamic and I can create N number of fields]
  3. If my index has around 540 fields, then why 1139 fields has been mentioned in es error ?
  4. Is there any solution apart from #2 ?
1 Like

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