# Error : Limit of total fields \[1000\] in index has been exceeded

**URL:** <https://discuss.elastic.co/t/error-limit-of-total-fields-1000-in-index-has-been-exceeded/118196>\
**Category:** Elasticsearch\
**Created:** [February 2, 2018, 9:37am UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-in-index-has-been-exceeded/118196 "2018-02-02T09:37:54Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rym\_Guerbi\_Michaut](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rym_guerbi_michaut/32/25496_2.png) [@Rym\_Guerbi\_Michaut](https://discuss.elastic.co/u/Rym_Guerbi_Michaut)\
**Post date:** [February 2, 2018, 9:37am UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-in-index-has-been-exceeded/118196/1 "2018-02-02T09:37:54Z")

</div>

Hi, there elastic community,  
I know this problem has already been exposed and even solved in some cases, but the solutions provided don't solve mine. Or I don't know how to apply them to my case.

**Tools:**

- Elasticsearch: 6.1
- Logstash: 6.1.2
- Kibana: 6.1
- Postman

Here's what I've done in Postman:  
**Create the indexindex: index :**  
`PUT http://localhost:9200/test_jira/timespent/test`  
with: test\_jira = index, timespent=type, test= document

**Increased total fields limit:**  
`"index.mapping.total_fields.limit": 10000`  
I have tried at first with 2000 then 3000 and went to 10 000

**Put some fields in the document:**  
PUT [http://localhost:9200/test\_jira/timespent/test](http://localhost:9200/test_jira/timespent/test)  
JSON in the body of Postman

It worked for 2 users and no more, but actually, I still have 94 other users to load and the error I get is:

```auto
                "reason": "Limit of total fields [1000] in index [test_jira] has been exceeded"

```

Is there anyone who could give a hand, please?

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [February 2, 2018, 11:19am UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-in-index-has-been-exceeded/118196/2 "2018-02-02T11:19:49Z")

</div>

How many of the fields are actually useful to you for searching or aggregations?

I'm not familiar with Postman but it appears it is capable of spawning a lot of new fieldnames.  
It sounds like it would make sense to define a stricter mapping in elasticsearch that indexes the fields it cares about and either errors or sets `enabled:false` in the dynamic field mappings for new fields outside the set known to be of interest.

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [February 2, 2018, 1:48pm UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-in-index-has-been-exceeded/118196/3 "2018-02-02T13:48:46Z")

</div>

> [@Rym\_Guerbi\_Michaut](#):
>
> Increased total fields limit:
> 
> "index.mapping.total\_fields.limit": 10000
> 
> I have tried at first with 2000 then 3000 and went to 10 000

What does `GET put_index_name_here/_settings` show you?  
I'm not on ES 6 yet but had the same issue lately and increased the limit to 1500

This is what I see now

> {  
> " put\_index\_name\_here": {  
> "settings": {  
> "index": {  
> "mapping": {  
> "total\_fields": {  
> "limit": "1500"  
> ...

For some reason that will not format...

Anyway, you can't change that on an existing index (at least in ES5) so I create our daily indices in advance to set these settings. I hope to have a more elegant solution when jumping to ES6 but it kind of works for now 🙂

---

<div class="post-metadata">

**Author:** ![Rym\_Guerbi\_Michaut](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rym_guerbi_michaut/32/25496_2.png) [@Rym\_Guerbi\_Michaut](https://discuss.elastic.co/u/Rym_Guerbi_Michaut)\
**Post date:** [February 2, 2018, 1:59pm UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-in-index-has-been-exceeded/118196/4 "2018-02-02T13:59:49Z")

</div>

> [@A\_B](#):
>
> GET put\_index\_name\_here/\_settings

```auto
GET test_jira/_settings

```

gives:

```auto
{
  "test_jira": {
    "settings": {
      "index": {
        "creation_date": "1517563878815",
        "number_of_shards": "5",
        "number_of_replicas": "1",
        "uuid": "6eCY7oklTa-4cyYwd6sppA",
        "version": {
          "created": "6010299"
        },
        "provided_name": "test_jira"
      }
    }
  }
}

```

Doesn't show anything about the field limits. However, the following command:

```auto
GET test_jira/_settings

```

Shows it:

```auto
{
  "_index": "test_jira",
  "_type": "timespent",
  "_id": "test",
  "_version": 19,
  "found": true,
  "_source": {
    "settings": {
      "index.mapping.total_fields.limit": 1500,
      "number_of_shards": 1,
      "number_of_replicas": 0
    },
+ the document loaded

```

---

<div class="post-metadata">

**Author:** ![A\_B](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/a_b/32/17104_2.png) [@A\_B](https://discuss.elastic.co/u/A_B)\
**Post date:** [February 2, 2018, 2:15pm UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-in-index-has-been-exceeded/118196/5 "2018-02-02T14:15:20Z")

</div>

The `GET` commands look really similar 😛

```
GET test_jira

```

That should show you all fields. Maybe that will help figure out what's going on. Sounds like very verbose logging if you exhaust the fields limit after two users

The limit is _per index_ so maybe have one index per user? Also doesn't really sound like a great solution but, you know...

---

<div class="post-metadata">

**Author:** ![Rym\_Guerbi\_Michaut](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rym_guerbi_michaut/32/25496_2.png) [@Rym\_Guerbi\_Michaut](https://discuss.elastic.co/u/Rym_Guerbi_Michaut)\
**Post date:** [February 2, 2018, 2:17pm UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-in-index-has-been-exceeded/118196/6 "2018-02-02T14:17:20Z")

</div>

> [@Mark\_Harwood](#):
>
> I'm not familiar with Postman but it appears it is capable of spawning a lot of new fieldnames.
> 
> It sounds like it would make sense to define a stricter mapping in elasticsearch that indexes the fields it cares about and either errors or sets enabled:false in the dynamic field mappings for new fields outside the set known to be of interest.

Hi Mark,  
Actually, Postman does exactly the same work as the terminal, it's just an interface.  
Instead of doing:  
curl -XPUT in the terminal, you select PUT action, give the URL and give the JSON in the body part...  
I even do it in Kibana Dev Tools, it gives the same results.

---

<div class="post-metadata">

**Author:** ![Rym\_Guerbi\_Michaut](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rym_guerbi_michaut/32/25496_2.png) [@Rym\_Guerbi\_Michaut](https://discuss.elastic.co/u/Rym_Guerbi_Michaut)\
**Post date:** [February 2, 2018, 2:18pm UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-in-index-has-been-exceeded/118196/7 "2018-02-02T14:18:51Z")

</div>

Was thinking about it, or maybe at least a document per user... don't know how to handle them after that...

---

<div class="post-metadata">

**Author:** ![Rym\_Guerbi\_Michaut](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rym_guerbi_michaut/32/25496_2.png) [@Rym\_Guerbi\_Michaut](https://discuss.elastic.co/u/Rym_Guerbi_Michaut)\
**Post date:** [February 2, 2018, 3:08pm UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-in-index-has-been-exceeded/118196/8 "2018-02-02T15:08:34Z")

</div>

doesn't work, reached 7 documents (7 users) and got the same error ☹

---

<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:** [March 2, 2018, 3:08pm UTC](https://discuss.elastic.co/t/error-limit-of-total-fields-1000-in-index-has-been-exceeded/118196/9 "2018-03-02T15:08:35Z")

</div>

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