# Dynamic hierarchy / Taxonomy

**URL:** <https://discuss.elastic.co/t/dynamic-hierarchy-taxonomy/21775>\
**Category:** Elasticsearch\
**Created:** [January 22, 2015, 12:08pm UTC](https://discuss.elastic.co/t/dynamic-hierarchy-taxonomy/21775 "2015-01-22T12:08:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincent\_Spiewak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vincent_spiewak/32/828_2.png) [@Vincent\_Spiewak](https://discuss.elastic.co/u/Vincent_Spiewak)\
**Post date:** [January 22, 2015, 12:08pm UTC](https://discuss.elastic.co/t/dynamic-hierarchy-taxonomy/21775/1 "2015-01-22T12:08:18Z")

</div>

Hi there !

I wonder what is the best way to index / query a dynamic hierarchy...

For example :

- Company \> Department \> Services \> Persons
- Company \> Department \> Department \> Services \> Persons
- Company \> Department \> Department \> Services \> Services \> Persons
- etc...

Best regards

--  
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/243db27c-a7cc-457a-948d-fa1c821b9c7d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/243db27c-a7cc-457a-948d-fa1c821b9c7d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [January 24, 2015, 12:36pm UTC](https://discuss.elastic.co/t/dynamic-hierarchy-taxonomy/21775/2 "2015-01-24T12:36:23Z")

</div>

The way that you should model your data typically depends on the kind of  
queries that you need to run. Maybe you can tell us more about queries?

On Thu, Jan 22, 2015 at 1:08 PM, Vincent Spiewak [vspiewak@gmail.com](mailto:vspiewak@gmail.com) wrote:

> Hi there !
> 
> I wonder what is the best way to index / query a dynamic hierarchy...
> 
> For example :
> 
> - Company \> Department \> Services \> Persons
> - Company \> Department \> Department \> Services \> Persons
> - Company \> Department \> Department \> Services \> Services \> Persons
> - etc...
> 
> Best regards
> 
> --  
> 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/243db27c-a7cc-457a-948d-fa1c821b9c7d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/243db27c-a7cc-457a-948d-fa1c821b9c7d%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/243db27c-a7cc-457a-948d-fa1c821b9c7d%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/243db27c-a7cc-457a-948d-fa1c821b9c7d%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
Adrien Grand

--  
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/CAL6Z4j53M2wW0gNVHvv1ycoTuHC3Ujp8ELo73UjHJn5\_ztLpdQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j53M2wW0gNVHvv1ycoTuHC3Ujp8ELo73UjHJn5_ztLpdQ%40mail.gmail.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:36am UTC](https://discuss.elastic.co/t/dynamic-hierarchy-taxonomy/21775/3 "2017-07-06T00:36:50Z")

</div>


