Gravatar for akumar346@sapient.com

Question by AKumar346, Mar 5, 2018 1:31 AM

CombinedData stats API giving top clicked document in response.

Hi,

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

Thanks

2 Replies
Gravatar for erocheleau@coveo.com

Answer by Etienne, Mar 5, 2018 7:22 PM

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.

See: https://onlinehelp.coveo.com/en/cloud/managing_machine_learning_automatic_relevance_tuning_in_a_query_pipeline.htm

> 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.

Gravatar for akumar346@sapient.com

Comment by AKumar346, Mar 9, 2018 8:38 AM

Yes after query param empty, it's not repeating the same documentTitle.

For 2nd point, please suggest how can we get more properties in response like (documentID or document field names).

Gravatar for eaubin@coveo.com

Answer by eaubin, Mar 19, 2018 9:58 AM

Hi @Akumar

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.

Ask a question