November 2007 - Posts

The other day, I was tweaking the display of my CoreResultsWebPart and after I made some changes and redeployed my search feature, when I executed a search, I got the following error.

Your search cannot be completed because of a service error. Try your search again or contact your administrator for more information.

This error can actually be caused by a number of things, luckily this time it was pretty simple. If you are lucky you cap examine the application log and there might be something of value. In my case there actually was.

Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (31ed8895-7b7c-4b29-8487-41361f1edca6). Reason: An item with the same key has already been added. Techinal Support Details: System.ArgumentException: An item with the same key has already been added. at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.SynchronizeDefaultContentSource(IDictionary applications) at Microsoft.Office.Server.Search.Administration.SearchServiceInstance.Synchronize() at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)

It turns out while I was adding new columns to my SelectColumns property, I had accidently added the one column twice to the XML. So the moral of the story, be sure you dont add the same column twice to this property or CoreResultsWebPart will die.