Question

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;              
});
Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top