This a common error message which you can see if you have search issues “Object reference not to set an instance of an object”. This error message does not tell much and you will have to look SharePoint log and find the correlation ID.

If you search on the internet for this error you will hit numerous reasons and fix for it. Problem is that error message is very generic and can be seen for various kind of issues. I have encountered this in two scenarios which I am gonna list down.

First thing you need to check SharePoint health, if there is an error in that best resolution is to recreate the index

You must have some error message in SharePoint search status like below

search-topology-monitoring

Reset search index

If that is the not the case the other reason can be you have orphaned items in your farm / content database. Generally you will get error message in SharePoint Health Analyzer for this but in our case we did not get it strangely. So basically you cannot trust it so best is to look for correlation ID in SharePoint Log.

What I observed is that when you search in SharePoint it will enumerate all site collections and it might fail doing so if you have orphaned items. You should look carefully and find out which content database it was enumerating.

If you have find out you should use below command to Refresh Sites for the content database. This method synchronizes information between content and config databases.

$db = Get-SPDatabase | where {$_.Name -eq “DatabaseName”}

$db.RefreshSitesInConfigurationDatabase()

If this also does not work you can use below as well but this needs to be done out of office hours.

Dismount-SPContentDatabase “<ContentdBName>”

Mount-SPContentDatabase “” -DatabaseServer “” -WebApplication http://SiteName

Hopefully this well help someone and I just added one more solution in list of solution available.

In case you need more help on this or other SharePoint issues please contact us via our Contact Us page or via our Facebook page or via Twitter

Like us on Facebook and follow us on Twitter

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s