# Query on number of attribues/fields in an index

**URL:** <https://discuss.elastic.co/t/query-on-number-of-attribues-fields-in-an-index/191347>\
**Category:** Elasticsearch\
**Created:** [July 19, 2019, 8:26am UTC](https://discuss.elastic.co/t/query-on-number-of-attribues-fields-in-an-index/191347 "2019-07-19T08:26:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vin0d](https://avatars.discourse-cdn.com/v4/letter/v/46a35a/32.png) [@vin0d](https://discuss.elastic.co/u/vin0d)\
**Post date:** [July 19, 2019, 8:26am UTC](https://discuss.elastic.co/t/query-on-number-of-attribues-fields-in-an-index/191347/1 "2019-07-19T08:26:22Z")

</div>

Is there any limitation of number of attributes/fields added for a index ?  
Planning to use filtered aliases to avoid multiple indices, however have to add more attributes and all these attributes will not be populated each aliases. There could be lot of empty data in the document, will this cause any issue in performance or space ?

---

<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:** [July 19, 2019, 9:24am UTC](https://discuss.elastic.co/t/query-on-number-of-attribues-fields-in-an-index/191347/2 "2019-07-19T09:24:12Z")

</div>

Welcome.

There's a default limit of 1000 fields in an index.

---

<div class="post-metadata">

**Author:** ![vin0d](https://avatars.discourse-cdn.com/v4/letter/v/46a35a/32.png) [@vin0d](https://discuss.elastic.co/u/vin0d)\
**Post date:** [July 19, 2019, 9:38am UTC](https://discuss.elastic.co/t/query-on-number-of-attribues-fields-in-an-index/191347/3 "2019-07-19T09:38:29Z")

</div>

Thank you, do you foresee any issue if we have 500 field index, and document may have only populating only 100 fields depending on the aliases  
say there for aliases 1 1-100 field and aliases 2 101-200 etc.

Does this approach is costly ? or is it better to create multiple index with 100 fields (number of indexes in that case will be around 500)

---

<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:** [July 19, 2019, 9:40am UTC](https://discuss.elastic.co/t/query-on-number-of-attribues-fields-in-an-index/191347/4 "2019-07-19T09:40:47Z")

</div>

It depends. If you end up creating 10000 indices, then I'd prefer wasting some space with blank fields.  
If it keeps the number of indices (and shards) minimal, then yeah a dedicated mapping per index.

---

<div class="post-metadata">

**Author:** ![vin0d](https://avatars.discourse-cdn.com/v4/letter/v/46a35a/32.png) [@vin0d](https://discuss.elastic.co/u/vin0d)\
**Post date:** [July 19, 2019, 9:43am UTC](https://discuss.elastic.co/t/query-on-number-of-attribues-fields-in-an-index/191347/5 "2019-07-19T09:43:13Z")

</div>

Thanks David

---

<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:** [August 16, 2019, 9:43am UTC](https://discuss.elastic.co/t/query-on-number-of-attribues-fields-in-an-index/191347/6 "2019-08-16T09:43:17Z")

</div>

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