SharePoint Search Not Returning Any Results

Today in our test environment I ran into an issue in which SharePoint search was not returning any results when queried.  Well that’s not true.  It returned an error.  That’s a result right?  When returning the results the error: “Search has encountered a problem that prevents results from being returned.  If the problem persists, please contact your administrator”.  It also provides a correlation ID (very helpful).

SharePoint Search Not Returning Any Results - SearchError

Find Out What The Problem Is

This is where having that correlation id is so handy.  When searching for errors in the ULS logs it is extremely hard to find what you need, unless you know what you are looking for.  So instead, we are going to use PowerShell to parse out only the information we need.

Open up a PowerShell management shell window on one of the servers in your farm.  We are going to use the provided correlation token in the following command:

Merge-SPLogFile is a PowerShell command that accesses the SharePoint ULS logs and massages it depending on the variables provided.  In this case we requested everything that had our correlation token and to store it at a specific location.  You can read up further on Merge-SPLogFile here.

There is a lot of information even in this sub-set of data, but the key lines I found were:

Specifically the following: “Cannot plan query for index system SP1350871b4ef2. Index fragment ‘0’ has no available cells.” This is basically saying that it can’t build the query to send to the index because there is something wrong with the index.

Checking the search administration page I find that there are warnings in my index partitions:

SharePoint Search Not Returning Any Results - Search Config Problem

One solution to fix this problem is to simply reset the index and re-crawl.  However, checking a little further I found the Index drive on my App server had filled up.  Re-indexing would have been a temporary fix at best.  So always make sure you have covered all your bases.  If I hadn’t looked a little further I would have been right back where I was very soon.

Once we allocated more space to the drive, I reset the index and re-ran the crawls (I felt resetting was best as the index may have corrupted).  Side Note: more information on determining the space required for an index can be found here.  It’s a bit old, but the high-level points are still valid.

Hope this is of assistance to others with this problem.


Thanks for reading!!