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 -Path 'L:\LogFile-Merges\searchissue-19Sep2016.log' -Correlation bf4fa59d-fc64-90df-9124-1bf69ee48a61

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:

09/19/2016 08:17:32.61 	NodeRunnerQuery2-3a8320ae-3b85- (APP-SPT-SVC-T2:0x1458)	0x17FC	Search                        	Query Processing              	aizag	Unexpected	Microsoft.Ceres.InteractionEngine.Component.FlowHandleRegistry : Exceptions occurred when evaluating the flow.  Microsoft.Ceres.Evaluation.DataModel.EvaluationException: Cannot plan query for index system SP1350871b4ef2. Index fragment '0' has no available cells. Cell statuses: [Cell I.0.0 on node IndexComponent1: Cell status service not injected (cell down or no FsIndex query service)][Cell I.1.0 on node IndexComponent2: Cell status is set to 'not available' (cell out of sync or seeding)]     at Microsoft.Ceres.Evaluation.Engine.ErrorHandling.HandleExceptionRecordSetSink.DoWithTryCatch(IRecord record)     at Microsoft.Ceres.InteractionEngine.Component.FlowHandleRegistry.SubmitData(FlowExecutionInfo handle, InputData inputData, Stopwatch timer, String correlationId, Guid tenantId, String q...	bf4fa59d-fc64-90df-9124-1bf69ee48a61
09/19/2016 08:17:32.61*	NodeRunnerQuery2-3a8320ae-3b85- (APP-SPT-SVC-T2:0x1458)	0x17FC	Search                        	Query Processing              	aizag	Unexpected	...uery, String flowName, Int32 queryTimeoutMillis)     at Microsoft.Ceres.InteractionEngine.Component.FlowHandleRegistry.ExecuteFlow(String flowName, InputData input, Int32 queryTimeoutMillis)	bf4fa59d-fc64-90df-9124-1bf69ee48a61

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!!