Most searched term component
I have a requirement to show most frequently searched term in my search omnibox, is there any way to render the most searched term in coveoUI?
Using Enterprise Cloud - Cloud
Sitecore version Sitecore.NET 8.2 (rev. 161221)
The answer to this question really depends on your needs.
If all you want is to show a few suggestions on your omnibox when the user is typing a query, then you just need to enable the query suggestion feature provided by our search interface (https://docs.coveo.com/en/873/coveo-for-sitecore-v4/provide-query-suggestions) as mentioned by @François Lachance-Guillemette.
However, if for a given reason you really need to fetch all this data manually to front it in a different fashion other than our omnibox, I’d suggest you to take a look on the Coveo SearchAPI querySuggest call instead of trying to call directly the Usage Analytics platform (https://developers.coveo.com/display/public/SearchREST/Getting+Query+Suggestions). It is way simpler and user friendly since it was conceived for this purpose.
All that said, if you still want to fetch this information from the Coveo Usage Analytics platform you should check those links:
- https://platform.cloud.coveo.com/docs?api=UsageAnalyticsRead#!/Statistics32API324532Version3215/get_v15_stats_topQueries (this is simpler than the previous one)
The "most frequently searched term" from the Omnibox is called "Query Suggestions".
If you check in your network tab when you execute a query, you can see a call to the `/querySuggest` endpoint which returns suggestions.
There is no component OOTB that fronts this elsewhere in the page than in the omnibox, but it would be possible to call this endpoint and show the values.