I need to change the results ordering via setSearchStartingCallback.

This is to order the results by date if user is on "news" refinement (tab).

customSearchControl.setSearchStartingCallback(this, function(sc, searcher, query) {
     document.getElementById('SearchForm_Search').value = query;              
});
有帮助吗?

解决方案

There wasn't a setting to this using the google-custom-search api, I ended up using custom javascript magic

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top