Sharepoint - Change query for the default search result page (osssearchresults.aspx) in SharePoint 2013?

This page is not intended to be changed. It is a system page, changing it would change the query for everyone in every site collection. The best practice it to avoid it all together by routing your queries to the Search Center. You can do this through the site collection Search settings.


Go to Site Settings -> Search Settings (on site collection level or site level). There you can enter the center search URL on 2 places, see also printscreen:

/Paginas/MyCustomSearchResultsPage.aspx

enter image description here


You can actually change the query for osssearchresults.aspx. If you create a new result source on your site collection, apply some filter to it and mark it to be the default result source, then this will be used.

But you should note that this will also impact searches in document libraries. So if you create a result source which filters away say word documents, then those won't show in library searches either.

Tags:

Search