# Is es suitable for sparse data structure?

**URL:** <https://discuss.elastic.co/t/is-es-suitable-for-sparse-data-structure/39496>\
**Category:** Elasticsearch\
**Created:** [January 19, 2016, 3:34am UTC](https://discuss.elastic.co/t/is-es-suitable-for-sparse-data-structure/39496 "2016-01-19T03:34:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![t7s](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@t7s](https://discuss.elastic.co/u/t7s)\
**Post date:** [January 19, 2016, 3:34am UTC](https://discuss.elastic.co/t/is-es-suitable-for-sparse-data-structure/39496/1 "2016-01-19T03:34:12Z")

</div>

There is a data structure like nesting json but I can't define field name beforehand as of field name is defined by end user

I know if dynamic option is setting to true will make the fields number in mapping increase, so

1 How much is recommended maximum fields one index?  
2 There are a lot of fields in one index, but there are a few not-null fields in one document in the index averagely. This condition will result in serious resource waste?

---

<div class="post-metadata">

**Author:** ![ebuildy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ebuildy/32/6070_2.png) [@ebuildy](https://discuss.elastic.co/u/ebuildy)\
**Post date:** [April 28, 2017, 8:19am UTC](https://discuss.elastic.co/t/is-es-suitable-for-sparse-data-structure/39496/2 "2017-04-28T08:19:04Z")

</div>

Read [https://www.elastic.co/blog/sparse-versus-dense-document-values-with-apache-lucene](https://www.elastic.co/blog/sparse-versus-dense-document-values-with-apache-lucene)

There is a benchmark about sparse data here 🙂

[https://home.apache.org/~mikemccand/lucenebench/sparseResults.html](https://home.apache.org/~mikemccand/lucenebench/sparseResults.html)

---

<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 5, 2017, 10:00pm UTC](https://discuss.elastic.co/t/is-es-suitable-for-sparse-data-structure/39496/3 "2017-07-05T22:00:50Z")

</div>


