Initial SharePoint Search Results Timeout Problem
When working with several million results and extremely complex queries even with a relatively robust farm you may get a “Something Went Wrong” error in search. Delving deeper you can see that there is a timeout set for queries longer than 15 seconds. So what we want to do is extend the SharePoint 2013 Search Results webpart query timeout.
This may not be common, but when your users are creating extremely complex queries with over a dozen keywords and boolean operators it can overwhelm the query servers having to look through over 10s of millions of results.
SearchServiceApplication::Execute–Exception: System.ServiceProcess.TimeoutException: The current operation timed-out after 15 seconds
Researching the Problem
If you search on this there are several ways to set timeouts but none for the query timeout that I found and the query.timout property is obsolete in 2013.
So eventually I found SharePoint Search REST API overview, which talks about how the REST Search API has a Timeout Property.
“Fixing” the Problem without Code
Since in the particular environment I am having an issue we cannot deploy custom solutions I tried out using the same property in the JSON query that the Search Results Webpart uses.
So In order to increase the time out for the search results webpart we first need to export the Search results webpart.
Now reimport the webpart and your timeout is now 60 seconds.
Note that this is the maximum value for the property.