# Anyway to filter based on fields always in query\_suggestion?

**URL:** <https://discuss.elastic.co/t/anyway-to-filter-based-on-fields-always-in-query-suggestion/254031>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [November 2, 2020, 1:53pm UTC](https://discuss.elastic.co/t/anyway-to-filter-based-on-fields-always-in-query-suggestion/254031 "2020-11-02T13:53:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dholakianivid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dholakianivid/32/78271_2.png) [@dholakianivid](https://discuss.elastic.co/u/dholakianivid)\
**Post date:** [November 2, 2020, 1:53pm UTC](https://discuss.elastic.co/t/anyway-to-filter-based-on-fields-always-in-query-suggestion/254031/1 "2020-11-02T13:53:32Z")

</div>

I am working off search ui project but the way I see the documentation is limited to one query field in query suggestion api. If the user is not allowed to see all the documents in the engine it can become a problem. Any way we can filter suggestion based on a field match that can be added?

For Example: search api filters can be added by proxy to only show results based on what user has access to.

---

<div class="post-metadata">

**Author:** ![nickchow](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nickchow/32/42547_2.png) [@nickchow](https://discuss.elastic.co/u/nickchow)\
**Post date:** [November 25, 2020, 5:40pm UTC](https://discuss.elastic.co/t/anyway-to-filter-based-on-fields-always-in-query-suggestion/254031/2 "2020-11-25T17:40:53Z")

</div>

Hi Nivid,

If I understand your question correctly, it sounds like you're asking about whether you can limit the documents a user has access to based on some field.

[Signed Search Keys](https://www.elastic.co/guide/en/app-search/current/authentication.html#authentication-signed) allow you to do exactly that – you can limit the documents or fields a user can search over and see.

Hope that helps,  
Nick

---

<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:** [December 23, 2020, 5:41pm UTC](https://discuss.elastic.co/t/anyway-to-filter-based-on-fields-always-in-query-suggestion/254031/3 "2020-12-23T17:41:01Z")

</div>

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