# Autocomplete - Hierarchical Data

**URL:** <https://discuss.elastic.co/t/autocomplete-hierarchical-data/252696>\
**Category:** Elasticsearch\
**Created:** [October 20, 2020, 1:56pm UTC](https://discuss.elastic.co/t/autocomplete-hierarchical-data/252696 "2020-10-20T13:56:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sumanthmitra](https://avatars.discourse-cdn.com/v4/letter/s/ea5d25/32.png) [@sumanthmitra](https://discuss.elastic.co/u/sumanthmitra)\
**Post date:** [October 20, 2020, 1:56pm UTC](https://discuss.elastic.co/t/autocomplete-hierarchical-data/252696/1 "2020-10-20T13:56:46Z")

</div>

Hello,

I am looking for autocomplete functionality for the hierarchical data and was wondering if it's possible to achieve this functionality with elasticsearch. As an example, consider the below data.

"phrase1" / "word1" / "phrase2"  
"phrase1" / "word2"  
"word2" / "phrase3" / "word3"  
.....

where phrasex and wordx are any english words/phrases.

The suggestions should only be from the immediate children of root node until there is a match on the input and one of the top level nodes. The subsequent suggestions should be from the child of the node that had a match.  
Is this possible?

Thanks much.  
\_  
mithra

---

<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:** [November 17, 2020, 1:57pm UTC](https://discuss.elastic.co/t/autocomplete-hierarchical-data/252696/2 "2020-11-17T13:57:01Z")

</div>

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