# Elastic Search - Limit of total fields \[1000\] - How to set in Docker compose file?

**URL:** <https://discuss.elastic.co/t/elastic-search-limit-of-total-fields-1000-how-to-set-in-docker-compose-file/334582>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [May 29, 2023, 11:44am UTC](https://discuss.elastic.co/t/elastic-search-limit-of-total-fields-1000-how-to-set-in-docker-compose-file/334582 "2023-05-29T11:44:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eduardo\_Montes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eduardo_montes/32/100049_2.png) [@Eduardo\_Montes](https://discuss.elastic.co/u/Eduardo_Montes)\
**Post date:** [May 29, 2023, 11:44am UTC](https://discuss.elastic.co/t/elastic-search-limit-of-total-fields-1000-how-to-set-in-docker-compose-file/334582/1 "2023-05-29T11:44:21Z")

</div>

I use ES 6.24 what is running via Docker image configured in docker compose file.  
After some time I got error _Limit of total fields [1000] in index **my\_index** has been exceeded_.  
I tried to use set this limit in environment part:  
`environment: - FIELDS_LIMIT=3000`  
but the error still occurs. When I used command bellow the size was increased  
`curl -X PUT "localhost:9200/_all/_settings" -d '{"template": "*","order": 0,"settings": {"index": {"mapping": {"total_fields": { "limit": 3000 }}}}}'`

Is any solution for this issue?  
I tried to add the curl command to command property in yml file but it failed. Probably because the ES hasn't started yet.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 29, 2023, 11:55am UTC](https://discuss.elastic.co/t/elastic-search-limit-of-total-fields-1000-how-to-set-in-docker-compose-file/334582/2 "2023-05-29T11:55:23Z")

</div>

That setting can not be set through the configuration file so the best option is probably to add an index template.

---

<div class="post-metadata">

**Author:** ![Eduardo\_Montes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eduardo_montes/32/100049_2.png) [@Eduardo\_Montes](https://discuss.elastic.co/u/Eduardo_Montes)\
**Post date:** [May 29, 2023, 12:34pm UTC](https://discuss.elastic.co/t/elastic-search-limit-of-total-fields-1000-how-to-set-in-docker-compose-file/334582/3 "2023-05-29T12:34:08Z")

</div>

What ES version supports property FIELDS\_LIMIT? I used for test image with 7.16.1 and there were fields limit set correctly by this property. Is it 7.X.X and above?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [May 29, 2023, 3:03pm UTC](https://discuss.elastic.co/t/elastic-search-limit-of-total-fields-1000-how-to-set-in-docker-compose-file/334582/4 "2023-05-29T15:03:01Z")

</div>

If that is a feature that has been available, I was not aware of it. I therefore do not think I can help much.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [May 30, 2023, 1:04am UTC](https://discuss.elastic.co/t/elastic-search-limit-of-total-fields-1000-how-to-set-in-docker-compose-file/334582/5 "2023-05-30T01:04:59Z")

</div>

> [@Eduardo\_Montes](#):
>
> ES 6.24

Please note that version is [EOL](https://www.elastic.co/support/eol) and no longer supported, you should be looking to upgrade as a matter of urgency.

---

<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:** [June 27, 2023, 1:05am UTC](https://discuss.elastic.co/t/elastic-search-limit-of-total-fields-1000-how-to-set-in-docker-compose-file/334582/6 "2023-06-27T01:05:01Z")

</div>

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