# Limit in elasticsearch

**URL:** <https://discuss.elastic.co/t/limit-in-elasticsearch/134607>\
**Category:** Elasticsearch\
**Created:** [June 5, 2018, 11:53am UTC](https://discuss.elastic.co/t/limit-in-elasticsearch/134607 "2018-06-05T11:53:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shafelis](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@shafelis](https://discuss.elastic.co/u/shafelis)\
**Post date:** [June 5, 2018, 11:53am UTC](https://discuss.elastic.co/t/limit-in-elasticsearch/134607/1 "2018-06-05T11:53:38Z")

</div>

I get the below error while trying to create an index. What could be be problem?

{"error":{"root\_cause":[{"type":"illegal\_argument\_exception","reason":"Limit of total fields [1000] in index [test] has been exceeded"}],"type":"illegal\_argument\_exception","reason":"Limit of total fields [1000] in index [est] has been exceeded"},"status":400}

---

<div class="post-metadata">

**Author:** ![Magnus\_Kessler](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnus_kessler/32/42001_2.png) [@Magnus\_Kessler](https://discuss.elastic.co/u/Magnus_Kessler)\
**Post date:** [June 5, 2018, 12:03pm UTC](https://discuss.elastic.co/t/limit-in-elasticsearch/134607/2 "2018-06-05T12:03:48Z")

</div>

Elasticsearch [limits](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html#mapping-limit-settings) the number of fields per index to 1000 by default.

This limit can be raised, but you should check why your data model needs a very large number of fields.

---

<div class="post-metadata">

**Author:** ![shafelis](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@shafelis](https://discuss.elastic.co/u/shafelis)\
**Post date:** [June 5, 2018, 1:15pm UTC](https://discuss.elastic.co/t/limit-in-elasticsearch/134607/3 "2018-06-05T13:15:55Z")

</div>

I have added that , but still getting the same error. I need all fields. Is there a way i can adjust it?

"index.mapping.total\_fields.limit": 20000,

---

<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:** [June 5, 2018, 1:29pm UTC](https://discuss.elastic.co/t/limit-in-elasticsearch/134607/4 "2018-06-05T13:29:03Z")

</div>

Add

```auto
"index.mapping.total_fields.limit": 100000000,

```

(not sure it works though)

Or better, follow what @Magnus_Kessler said:

> check why your data model needs a very large number of fields.

Seriously. Could you explain what you are doing?

---

<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 3, 2018, 1:41pm UTC](https://discuss.elastic.co/t/limit-in-elasticsearch/134607/5 "2018-07-03T13:41:54Z")

</div>

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