CombinedData stats API giving top clicked document in response.
I need to show top 5 clicked pages from searched page, i checked your response on https://answers.coveo.com/questions/14239/which-analytics-api-will-we-use-to-get-top-5-searc.html
The same i am trying but i found one URL is coming in response many times.
so i have two problems:
1) If content has changed from CMS but above api still gives the old documnetTitle name.
2) Can i get the document ID with the response
If you have a ML TopClicks model, one thing you could try is to change the query to an empty query when there is no search results. By default the TopClicks model will boost the most clicked documents to the top if the query is empty.
> On an empty query, ART returns the most clicked documents during the data period of the model.
You could find a way to let the user know that his query returned no results and mention that you are instead showing the top clicked documents otherwise it may be confusing.
Please answer to this if the response given does not work instead of creating a newer question. It will help us track the original question -> answer marked as accepted.
The UA API is not meant to be used as a normal index. I suggest you use Machine learning to get the most relevant results base on UA. ART is the way to go like mentioned by my colleague previously. If you want to build a custom no-result page to get the top 5 results then it could work. You can't have the Excerpt fields as it is generated at query time. In the case of a custom no-result page, you can do it in 2 queries, you get the top 5 documents, and you query the Search API to get the full results of these items.
Again, don't use the UA API in your regular search page, it's not meant for this.