# Get field name in Query Suggest response

**URL:** <https://discuss.elastic.co/t/get-field-name-in-query-suggest-response/258908>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [December 16, 2020, 7:31pm UTC](https://discuss.elastic.co/t/get-field-name-in-query-suggest-response/258908 "2020-12-16T19:31:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ismarslomic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ismarslomic/32/63870_2.png) [@ismarslomic](https://discuss.elastic.co/u/ismarslomic)\
**Post date:** [December 16, 2020, 7:31pm UTC](https://discuss.elastic.co/t/get-field-name-in-query-suggest-response/258908/1 "2020-12-16T19:31:25Z")

</div>

I have configured `SearchProvider` to show suggestions for 3 fields in `SearchBox`, but it can be quit difficult for user to understand meaning of these suggestions without some sort of "label". It would be very nice if I could display field name in addition to suggested value in suggestion dropdown.

For instance: `<suggestion> (<fieldname>)`

But I cant see that Query Suggestion API provides such metadata in response. Any tip on how to solve this?

---

<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 16, 2020, 11:15pm UTC](https://discuss.elastic.co/t/get-field-name-in-query-suggest-response/258908/2 "2020-12-16T23:15:13Z")

</div>

Hi @ismarslomic!

Unfortunately, the [Query Suggestion API](https://www.elastic.co/guide/en/app-search/current/query-suggestion.html) only returns suggestions as a list of individual suggestions and does not return the name of the field that the suggestion was based on.

I'm sorry to say I don't think this is possible at the moment.

---

<div class="post-metadata">

**Author:** ![ismarslomic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ismarslomic/32/63870_2.png) [@ismarslomic](https://discuss.elastic.co/u/ismarslomic)\
**Post date:** [December 16, 2020, 11:17pm UTC](https://discuss.elastic.co/t/get-field-name-in-query-suggest-response/258908/3 "2020-12-16T23:17:28Z")

</div>

Thanks! Yeah, that would greatly increase the user experience if it was possible

---

<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 13, 2021, 11:17pm UTC](https://discuss.elastic.co/t/get-field-name-in-query-suggest-response/258908/4 "2021-01-13T23:17:32Z")

</div>

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