# Build index type with hundreds properties or many separate types?

**URL:** <https://discuss.elastic.co/t/build-index-type-with-hundreds-properties-or-many-separate-types/65625>\
**Category:** Elasticsearch\
**Created:** [November 10, 2016, 10:10am UTC](https://discuss.elastic.co/t/build-index-type-with-hundreds-properties-or-many-separate-types/65625 "2016-11-10T10:10:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mendy](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@mendy](https://discuss.elastic.co/u/mendy)\
**Post date:** [November 10, 2016, 10:10am UTC](https://discuss.elastic.co/t/build-index-type-with-hundreds-properties-or-many-separate-types/65625/1 "2016-11-10T10:10:00Z")

</div>

Hello,

I need your advice in setting up an index in elastic.  
Under the index I need to keep Tens of millions of documents. underneath one of the fields have many properties and some fields exist in all documents type (and I also have to allow to perform a joint search).

Is it better to build one type with more than a thousand nested properties or to do for each type of document (maybe more then 500) own type of itself?

Thank you  
Mandy

---

<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:** [November 23, 2016, 8:28am UTC](https://discuss.elastic.co/t/build-index-type-with-hundreds-properties-or-many-separate-types/65625/2 "2016-11-23T08:28:33Z")

</div>

> [@mendy](#):
>
> I also have to allow to perform a joint search

You can't do "join" in elasticsearch. You have something similar with parent/child feature though but use it **only** if it's absolutely needed. Otherwise duplicating information is fine in most cases.

Note that from 5.0 you have some default limits now: [https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking\_50\_mapping\_changes.html#\_field\_mapping\_limits](https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_50_mapping_changes.html#_field_mapping_limits)

---

<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:** [December 21, 2016, 8:28am UTC](https://discuss.elastic.co/t/build-index-type-with-hundreds-properties-or-many-separate-types/65625/3 "2016-12-21T08:28:34Z")

</div>

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