# Limit of total fields \[1000\] in index has been exceeded particular json's

**URL:** <https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-has-been-exceeded-particular-jsons/222627>\
**Category:** Elasticsearch\
**Created:** [March 8, 2020, 11:31pm UTC](https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-has-been-exceeded-particular-jsons/222627 "2020-03-08T23:31:57Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bahadir\_Eyuboglu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bahadir_eyuboglu/32/64010_2.png) [@Bahadir\_Eyuboglu](https://discuss.elastic.co/u/Bahadir_Eyuboglu)\
**Post date:** [March 8, 2020, 11:31pm UTC](https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-has-been-exceeded-particular-jsons/222627/1 "2020-03-08T23:31:57Z")

</div>

I have huge json files, so i split the json files and index them one by one but no matter how smallest the split gets, i get limit total fields exception,  
Im using elastisearch on python, and i splitthe json objects through python dictionaries is there anything i can do to prevent this exception  
Interesting thing is it gives this is exception on particular JSON files not in all of them, is there anything wrong with json or split but then should i get the limit exception in every json file ?

---

<div class="post-metadata">

**Author:** ![Bahadir\_Eyuboglu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bahadir_eyuboglu/32/64010_2.png) [@Bahadir\_Eyuboglu](https://discuss.elastic.co/u/Bahadir_Eyuboglu)\
**Post date:** [March 8, 2020, 11:33pm UTC](https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-has-been-exceeded-particular-jsons/222627/2 "2020-03-08T23:33:17Z")

</div>

btw can anyone tell me how can i configure limit of fields in elasticsearch.yml file

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 9, 2020, 6:38am UTC](https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-has-been-exceeded-particular-jsons/222627/3 "2020-03-09T06:38:33Z")

</div>

Are you sure you want to have more than 1000 fields?  
You should check your json IMO.

But look at [https://www.elastic.co/guide/en/elasticsearch/reference/7.6/mapping.html#mapping-limit-settings](https://www.elastic.co/guide/en/elasticsearch/reference/7.6/mapping.html#mapping-limit-settings)

---

<div class="post-metadata">

**Author:** ![theDor](https://avatars.discourse-cdn.com/v4/letter/t/b4bc9f/32.png) [@theDor](https://discuss.elastic.co/u/theDor)\
**Post date:** [March 9, 2020, 9:51am UTC](https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-has-been-exceeded-particular-jsons/222627/4 "2020-03-09T09:51:17Z")

</div>

Hey,  
try splitting your jsons to less keys or try to create keys that contains metadata on your keys (like if you got an id so dont make a key for every id, create a mapping key that his name is id and query him when you need specific id).  
And about the limit of fields, you configure it on the index settings and not on the elasticsearch.yml like this: [Total Fields Limit setting](https://discuss.elastic.co/t/total-fields-limit-setting/53004)

---

<div class="post-metadata">

**Author:** ![rameshkr1994](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rameshkr1994/32/59029_2.png) [@rameshkr1994](https://discuss.elastic.co/u/rameshkr1994)\
**Post date:** [March 9, 2020, 11:07am UTC](https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-has-been-exceeded-particular-jsons/222627/5 "2020-03-09T11:07:23Z")

</div>

Hi @Bahadir_Eyuboglu.

you can also add the max limitation value is 10000 (default) at time of running the Elastic query.

```
`localhost:9200/kibana_sample_data_flights/_search?size=10000`

```

> in storage size=10mb

> error;-reason "Result window is too large, from + size must be less than or equal to: [10000] but was [100001]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max\_result\_window] index level setting."

Thanks  
HadoopHelp

---

<div class="post-metadata">

**Author:** ![Bahadir\_Eyuboglu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bahadir_eyuboglu/32/64010_2.png) [@Bahadir\_Eyuboglu](https://discuss.elastic.co/u/Bahadir_Eyuboglu)\
**Post date:** [March 9, 2020, 9:52pm UTC](https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-has-been-exceeded-particular-jsons/222627/6 "2020-03-09T21:52:31Z")

</div>

Well it's not in my hands i'm just at the database part of the project. the json files comes to me with these filters set

---

<div class="post-metadata">

**Author:** ![Bahadir\_Eyuboglu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bahadir_eyuboglu/32/64010_2.png) [@Bahadir\_Eyuboglu](https://discuss.elastic.co/u/Bahadir_Eyuboglu)\
**Post date:** [March 9, 2020, 9:53pm UTC](https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-has-been-exceeded-particular-jsons/222627/7 "2020-03-09T21:53:01Z")

</div>

Thank's i will try once i have succesfully index the data

---

<div class="post-metadata">

**Author:** ![Bahadir\_Eyuboglu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bahadir_eyuboglu/32/64010_2.png) [@Bahadir\_Eyuboglu](https://discuss.elastic.co/u/Bahadir_Eyuboglu)\
**Post date:** [March 9, 2020, 9:56pm UTC](https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-has-been-exceeded-particular-jsons/222627/8 "2020-03-09T21:56:19Z")

</div>

I know it but i dont use kibana so i try setting from terminal using  
curl -X PUT localhost:9200/restaurants -H 'Content-Type: application/json' -d'{ "index.mapping.total\_fields.limit": 2000 } ''

and the error i get is,

{"error":{"root\_cause":[{"type":"parse\_exception","reason":"unknown key [index.mapping.total\_fields.limit] for create index"}],"type":"parse\_exception","reason":"unknown key [index.mapping.total\_fields.limit] for create index"},"status":400}

can anyone help

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 10, 2020, 7:42am UTC](https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-has-been-exceeded-particular-jsons/222627/9 "2020-03-10T07:42:14Z")

</div>

You are missing the "settings" key here. Have a look at the documentation. [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html)

---

<div class="post-metadata">

**Author:** ![theDor](https://avatars.discourse-cdn.com/v4/letter/t/b4bc9f/32.png) [@theDor](https://discuss.elastic.co/u/theDor)\
**Post date:** [March 13, 2020, 10:32pm UTC](https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-has-been-exceeded-particular-jsons/222627/10 "2020-03-13T22:32:33Z")

</div>

But even if you will increase your max limit of fields, and you still adding more keys per document you will pass the new limit too.  
You need to solve the problem from the JSON side because if not you will lose performence

---

<div class="post-metadata">

**Author:** ![Bahadir\_Eyuboglu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bahadir_eyuboglu/32/64010_2.png) [@Bahadir\_Eyuboglu](https://discuss.elastic.co/u/Bahadir_Eyuboglu)\
**Post date:** [March 17, 2020, 9:59am UTC](https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-has-been-exceeded-particular-jsons/222627/11 "2020-03-17T09:59:07Z")

</div>

Thanks didnt even noticed

---

<div class="post-metadata">

**Author:** ![Bahadir\_Eyuboglu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bahadir_eyuboglu/32/64010_2.png) [@Bahadir\_Eyuboglu](https://discuss.elastic.co/u/Bahadir_Eyuboglu)\
**Post date:** [March 17, 2020, 9:59am UTC](https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-has-been-exceeded-particular-jsons/222627/12 "2020-03-17T09:59:49Z")

</div>

yeah but i dont think there will be 10000 fields but i will keep in mind

---

<div class="post-metadata">

**Author:** ![Bahadir\_Eyuboglu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bahadir_eyuboglu/32/64010_2.png) [@Bahadir\_Eyuboglu](https://discuss.elastic.co/u/Bahadir_Eyuboglu)\
**Post date:** [March 17, 2020, 10:00am UTC](https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-has-been-exceeded-particular-jsons/222627/13 "2020-03-17T10:00:26Z")

</div>

thanks for the advice

---

<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:** [April 14, 2020, 10:00am UTC](https://discuss.elastic.co/t/limit-of-total-fields-1000-in-index-has-been-exceeded-particular-jsons/222627/14 "2020-04-14T10:00:26Z")

</div>

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