Why suggestSearchQueries REST API call returns no data?
|Knowledge Article Number||000199104|
|Description||I am testing suggestSearchQueries REST API call which is described in the following API document, but when I test it, it returns nothing and never work even if I have Knowledge feature in my org? How can I make this work?
This API is related to "Auto-complete keyword search" Salesforce Knowledge feature. Basically, this feature suggests the three most popular keyword searches performed on the Knowledge tab in the UI.
To use this feature, you should enable it first in Knowledge Settings (Setup | Customize | Knowledge | Settings). For the details about this setup, please refer to the following online document.
How does this feature work? Salesforce uses a formula to calculate the query suggestions. This formula takes into account the number of times a query is executed, whether there are any results returned for the query (Salesforce will not show suggestions for queries which returns 0 result), and the number of clicks on search results for a given search query.
Salesforce calculates these numbers together once a day during off peak ours, so it can take up to 24 hours for a query suggestion to show up.
For testing purposes, you can execute a query that returns results more than 20 times in a day, and expect that query to show up as a suggestion the next day.
Once this works in Knowledge tab in the UI, then it will work through "suggestSearchQueries" REST API call as described in the REST API doc.