Common Suggestion with multiple fields grouped together

Can we have a suggestion object instead of

{"suggestion":"dominos"}

to be as

{"suggestion":"dominos", "category" : "100-1000-0000", "qty" : 10}

so the results are grouped by category and pass an amount of matches in this group

and we could represent suggestions in the UI as in the following example:
let's say search string is 'domi`

***Domino's Pizza
10 restaurants

***Dominoes shop
2 game shops

***Dominican Republic Embassy
1 organization

trying to improve search suggestions group wise.

Hi @kabilsharma :

Query Suggestion API does not provide additional information, as it is meant to receive suggestions for a query, not result suggestions.

You can use a search query in case you want to retrieve additional fields for results instead of a query suggestion, which I think matches your use case here.

I think this response could be helpful for the same use case if you're using Search UI.

Thanks Carlos for the response. We are exactly doing the same thing you mentioned.

Facing speed issue the TTFB goes upto 1.2 seconds sometimes while calculating responses. Which is twice the time taken by suggestion query and three times more then Elasticsearch Native.

I see many people experiencing similar problem on community forum.

It's expected that retrieving search results instead of query suggestions take more time, as it is a different kind of request entirely.

When you say "three times more then Elasticsearch Native", what is the comparison you're doing? What query is being done using Elasticsearch native?

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