# Configure an index to always index documents using nested types

**URL:** <https://discuss.elastic.co/t/configure-an-index-to-always-index-documents-using-nested-types/22405>\
**Category:** Elasticsearch\
**Created:** [February 26, 2015, 9:56am UTC](https://discuss.elastic.co/t/configure-an-index-to-always-index-documents-using-nested-types/22405 "2015-02-26T09:56:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Dexter](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Matthew\_Dexter](https://discuss.elastic.co/u/Matthew_Dexter)\
**Post date:** [February 26, 2015, 9:56am UTC](https://discuss.elastic.co/t/configure-an-index-to-always-index-documents-using-nested-types/22405/1 "2015-02-26T09:56:15Z")

</div>

How can I configure an index such that all documents added to the index  
which are not flat are always indexed as nested regardless of the depth of  
the hierarchy.

I believe this is possible with dynamic templates using the _default_ index  
but I can't find any definitive answer as to how to do this.

Thanks,

Matthew

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5a1fedfb-85c3-4ce3-8443-f7f5190f65a4%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5a1fedfb-85c3-4ce3-8443-f7f5190f65a4%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:29am UTC](https://discuss.elastic.co/t/configure-an-index-to-always-index-documents-using-nested-types/22405/2 "2017-07-06T00:29:55Z")

</div>


