There wasn't a setting to this using the google-custom-search api, I ended up using custom javascript magic
Google custom search change sort on search start callback
-
17-07-2023 - |
Vra
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;
});
Oplossing
Gelisensieer onder: CC-BY-SA met toeskrywing
Nie verbonde aan StackOverflow