# How to create dynamic search suggestions?

**URL:** <https://discuss.elastic.co/t/how-to-create-dynamic-search-suggestions/138311>\
**Category:** Elasticsearch\
**Created:** [July 3, 2018, 6:22am UTC](https://discuss.elastic.co/t/how-to-create-dynamic-search-suggestions/138311 "2018-07-03T06:22:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rs123](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rs123](https://discuss.elastic.co/u/rs123)\
**Post date:** [July 3, 2018, 6:22am UTC](https://discuss.elastic.co/t/how-to-create-dynamic-search-suggestions/138311/1 "2018-07-03T06:22:43Z")

</div>

I want to show suggestion while searching. For example sentence could be like "profit of NK Store in jan compared to feb". If someone types "profit of N", I want to show every store name starting with N or every product starting with N. If someone types "profit of NK Store in J", I want to show Jan, June, July as suggestion starting with J.

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [July 4, 2018, 12:47pm UTC](https://discuss.elastic.co/t/how-to-create-dynamic-search-suggestions/138311/2 "2018-07-04T12:47:10Z")

</div>

That looks to be a search syntax of your own invention.  
You'll need to write a custom parser that translates that language into the [elasticsearch query DSL](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.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:** [August 1, 2018, 12:47pm UTC](https://discuss.elastic.co/t/how-to-create-dynamic-search-suggestions/138311/3 "2018-08-01T12:47:23Z")

</div>

Closed on August 1, 2018, 12:47pm UTC

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