Search Result do not work sometimes


When using the Federated Search WebPart in SharePoint, the results are sometimes displayed and sometimes not. This can either depend on the time of the search or the search term (e.g. the company name sometimes returns results, and in the next hour it doesn't)


You will see a message in the logs like this:

Microsoft.Office.Server.Search.Query.Pipeline.Connectors.OpenSearchReaderConnector : Response length exceeded maximum length: [url=http://<base-url>/wiki/plugins/servlet/opensearch/1.0?query=search+AND+term%24%24count*10%24%24%24%24user*ctzr4974%24%24%24%24impersonation*true%24%24&format=rss_1.0&os_authType=basic], [MaximumResponseLength=64] System.Net.WebException: Response length exceeded maximum length

SharePoint uses different response lengths for external result sources (such as the Confluence result source) and the internal result sources.

To increase the length of the result source, you will need to run the following power shell script on the SharePoint Server that your Search Applications runs on. You will also need to change the value of $sourceName

Add-PSSnapin Microsoft.SharePoint.PowerShell
$sourceName = "_-_-_"
$ssa = Get-SPEnterpriseSearchServiceApplication
$fedman = New-Object Microsoft.Office.Server.Search.Administration.Query.FederationManager($ssa)
$searchOwner = Get-SPEnterpriseSearchOwner -Level Ssa
$objResultSource = $fedman.GetSourceByName($sourceName, $searchOwner)
$objResultSource.MaximumResponseLength = 655360

If the error still persists, you need to get rid of SP cache by reseting IIS of query server.

There is no content with the specified labels