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)
Thanks!
Answer by Hugo Santos · May 28, 2018 at 08:34 PM
Hi @Ravi,
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:
We need to show the 5 trending keywords to the user not the query suggestion, it can be used as separate component that can be used in any part of a page.Is there any better way to show these trending keywords apart from using API call? If i am using usage analytics API to authorize the calls is it correct to use api key generated at coveo cloud platform for authentication of the API calls or is there any other way to authenticate it?
Hi @Ravi,
So you really want a completely separated component which is able to show the 5 most searched keywords.
Coveo provides the API to fetch this information but you will have to develop the interface yourself since there is not something like that in the product currently.
My bet is that you will be fine using the following call, is is really simple:
If your previously generated API key has the right access to use this kind of service you should be able to use them without any issue.
If for a given reason that's not the case please let us know and we will help you as well.
Thanks for the suggestion, One more query i have regarding API call to get time zone independent result and also how do we get timezone independent data in the dashboard of usage analytics?
we are trying to use this https://usageanalytics.coveo.com/rest/v15/stats/trends API call.
Hi @Ravi,
I'd like to suggest you to open a new question with the usage-analytics tag. I'm sure that someone from that team will be more than pleasured to answer it as soon as possible.
Answer by François Lachance-Guillemette · May 25, 2018 at 01:08 PM
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.
We are trying to get the data from coveo usage analytics like trending keywords using API call
https://usageanalytics.coveo.com/rest/v15/stats/trends
how do we invoke and authorize this to get the data that we need? is there any best practice if i have consume these data for custom component?
Coveo Indexes go Read-Only mode often 1 Answer
Requirejs and Coveo for Sitecore 4 Configuration 1 Answer
No JavaScipt query 2 Answers
Disabled Facet Presentation Details 1 Answer
Querying Coveo programmatically 0 Answers