Gravatar for

Question by ArthurN, May 30, 2018 5:54 PM

TopQueries not returning results

I am attempting to use the TopQueries (!/Statistics32API324532Version3215/get_v15_stats_topQueries) API call to find top queries related to a users current search. However I am not seeing any results from this call.

QuerySuggest works just fine with my data set, and I meet all the minimum requirements for data gathered in Analytics to make the TopQueries call yet I still get nothing back.

My Training set is to Daily update with a 1 month data set for the model associated with the pipeline (no filters applied)

3 Replies
Gravatar for

Answer by Vincent, Jun 6, 2018 5:11 PM

To close this subject, we used the QuerySuggest API just like @Etienne suggested, in a small HTML component with an AJAX call. The resulting component resides in the Search Interface, near the footer, and helps the user sees other popular queries related to the current search, A.K.A. "People also search for".

Gravatar for

Answer by Etienne, May 30, 2018 6:07 PM

TopQueries has nothing to do with QuerySuggest.

It is just a way to query your whole analytics to view the top queries on your entire organization.

Mostly used to do dashboards.

You are looking for!/Search/get_rest_search_v2_querySuggest

Use this instead to get suggestions of query.

Gravatar for

Comment by ArthurN, May 30, 2018 6:11 PM

We are already using querysuggest on the search box itself for feedback to the user while they are typing out their query. It was recommended to us by @Vincent to use TopQuery for this use case where we display a list of related search terms at the end of a result page.

Gravatar for

Answer by Vincent, May 30, 2018 7:25 PM

Your requirement did quite a nice debate here. The easiest way around would be to re-send the queried term to the querySuggest API, and you'll have some "similar" query terms to display in a component. The best approach would have been to use content recommendation, but it does not suggest query terms, it suggests content directly.

Ask a question