# Max field count and performances impact

**URL:** <https://discuss.elastic.co/t/max-field-count-and-performances-impact/76751>\
**Category:** Elasticsearch\
**Created:** [February 28, 2017, 9:46am UTC](https://discuss.elastic.co/t/max-field-count-and-performances-impact/76751 "2017-02-28T09:46:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dao](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@dao](https://discuss.elastic.co/u/dao)\
**Post date:** [February 28, 2017, 9:46am UTC](https://discuss.elastic.co/t/max-field-count-and-performances-impact/76751/1 "2017-02-28T09:46:22Z")

</div>

I am trying several mappings for my documents, and it turned out that the most convenient one is a data model with thousand of fields on my document.

**MAPPING#1**  
The mapping `[{param:ALT, value:40000}, {param:LON, value:1.36}, {param:SPEED, value:0.76}, ...]` was the best one in terms of flexibility, but querying it to have for instance `SPEED` average for `ALT` buckets of 1000ft is not easy to do, and especially not possible with kibana

**MAPPING#2**  
I'd rather the following: `{ALT:40000, LON:1.36, SPEED:0.76}` which allows easy querying

**ISSUE**  
In my situation (aircraft data) the count of parameters (fields) is reaching several thousands.

Is there a limitation on this? Or can you help me on the first mapping ?

regards,

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [February 28, 2017, 1:07pm UTC](https://discuss.elastic.co/t/max-field-count-and-performances-impact/76751/2 "2017-02-28T13:07:50Z")

</div>

Hi @dao,

yes, there is a [limit on the maximum number fields in an index](https://www.elastic.co/guide/en/elasticsearch/reference/5.2/mapping.html#mapping-limit-settings) and the default value is 1000 which is already very high so I suggest not to increase it even further.

It depends a bit on your use-case but I also think that mapping #2 is more straightforward. When creating a data model you should think about the structure in your data and how you want to query it. Maybe you can split the data into multiple (use-case specific) indices?

Daniel

---

<div class="post-metadata">

**Author:** ![dao](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@dao](https://discuss.elastic.co/u/dao)\
**Post date:** [March 2, 2017, 8:35am UTC](https://discuss.elastic.co/t/max-field-count-and-performances-impact/76751/3 "2017-03-02T08:35:05Z")

</div>

OK, I can partition the fields.

thanks

---

<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 30, 2017, 8:35am UTC](https://discuss.elastic.co/t/max-field-count-and-performances-impact/76751/4 "2017-03-30T08:35:24Z")

</div>

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