# Add a filter to query\_suggestion

**URL:** <https://discuss.elastic.co/t/add-a-filter-to-query-suggestion/258932>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [December 17, 2020, 12:42am UTC](https://discuss.elastic.co/t/add-a-filter-to-query-suggestion/258932 "2020-12-17T00:42:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andante/32/81010_2.png) [@andante](https://discuss.elastic.co/u/andante)\
**Post date:** [December 17, 2020, 12:42am UTC](https://discuss.elastic.co/t/add-a-filter-to-query-suggestion/258932/1 "2020-12-17T00:42:45Z")

</div>

A follow on from: [How to add filter in "query suggestion" feature](https://discuss.elastic.co/t/how-to-add-filter-in-query-suggestion-feature/216112)

Hi team,

I've run into the issue mentioned in the above query today, and was wondering if there was anything on the roadmap to allow filtering when doing a `query_suggestion` call?

I ask this because the alternative is to create an individual index for each category that we would otherwise filter by and that seems clunky. Or to do the mentioned fix in the above ticket, but I'm not sure how we can filter that down to a one-or-two word suggestion.

Any advice here would be great,

Thanks!

---

<div class="post-metadata">

**Author:** ![Brian\_McGue](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brian_mcgue/32/63366_2.png) [@Brian\_McGue](https://discuss.elastic.co/u/Brian_McGue)\
**Post date:** [December 17, 2020, 4:15pm UTC](https://discuss.elastic.co/t/add-a-filter-to-query-suggestion/258932/2 "2020-12-17T16:15:33Z")

</div>

Hi @andante! Unfortunately, our roadmap is not public. I believe I'm allowed to say there is an existing issue to improve Query Suggestions, and I've noted your comment here along with a couple of others on the Discuss Forums.

---

<div class="post-metadata">

**Author:** ![andante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andante/32/81010_2.png) [@andante](https://discuss.elastic.co/u/andante)\
**Post date:** [December 17, 2020, 8:46pm UTC](https://discuss.elastic.co/t/add-a-filter-to-query-suggestion/258932/3 "2020-12-17T20:46:37Z")

</div>

Thanks for the quick response. We will probably go along the path of creating multiple indexes for now.

---

<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:** [January 14, 2021, 8:46pm UTC](https://discuss.elastic.co/t/add-a-filter-to-query-suggestion/258932/4 "2021-01-14T20:46:49Z")

</div>

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