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

**URL:** https://discuss.elastic.co/t/elasticsearch-7-7-field-expansion-matches-too-many-fields-limit-1024-got-1139/237425
**Category:** Elasticsearch
**Created:** [June 17, 2020, 9:00am UTC](https://discuss.elastic.co/t/elasticsearch-7-7-field-expansion-matches-too-many-fields-limit-1024-got-1139/237425 "2020-06-17T09:00:05Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![pappukhode](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@pappukhode](https://discuss.elastic.co/u/pappukhode)
#### Post date: [June 17, 2020, 9:00am UTC](https://discuss.elastic.co/t/elasticsearch-7-7-field-expansion-matches-too-many-fields-limit-1024-got-1139/237425/1 "2020-06-17T09:00:06Z")

</div>

Hi,  
I am using _ES 7.7_ and indexed around _70K_ data. I also verified index has around _540 fields_ by invoking`http://es_host:port/2/_mapping`.

While performing simple search query I am getting `query_shard_exception`.

```auto
    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 ?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 15, 2020, 9:00am UTC](https://discuss.elastic.co/t/elasticsearch-7-7-field-expansion-matches-too-many-fields-limit-1024-got-1139/237425/2 "2020-07-15T09:00:08Z")

</div>

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