How to restart a query component in SharePoint 2010?
Sometimes you might have seen this warning in event log
Event ID: 2587
The following conditions are currently affecting index propagation to this server for search service application ‘ Search Service’: 1. Query 0 has been disabled so that crawls can continue. It may be recovered via the Restart-SPEnterpriseSearchQueryComponent command in PowerShell.
It indicates that SharePoint 2010 Search Query Component has been disabled and it needs to be restarted, this might occur due to index corruption. You might also see errors/warnings with Event ID 2581 and Event ID 74. When you get on to central admin and navigate to the Search administration screen, you might notice that the query component is disabled.
So How do you restart it? You can do it using the Restart-SPEnterpriseSearchQueryComponet, here it the power shell powershell script to do it
$S = Get-SPEnterpriseSearchServiceApplication -Identity ” Search Service Name”
$C =Get-SPEnterpriseSearchQueryComponent -QueryTopology $Q.ActiveTopology
$C | fl Name,State
$C | Restart-SPEnterpriseSearchQueryComponent
Once you run the script, if you go back to central admin and search administration page, you would see the status of the query component change to recovering and eventually the status should change to online.