Exchange indexing not working well

I want to share with you interesting case I had this week at one of my customers, the CTO complained that many users weren’t able to search content on  Outlook 2013 in Terminal.
I thought about several potential things such as Outlook versions, caches, Microsoft Updates,  and just at the end of possibilities, I went to the server to check some event logs. I opened the event viewer and found the following warning event:

Database number 1:

Database number 2:

I opened Exchange Shell and ran this:

Get-MailboxDatabaseCopyStatus * | ft -auto

 

Found that both databases were failed status in contentindexstate row

The solution was pretty easy:

  1. Stoping MSExchangeFastSearch and HostControllerService Services
  2. finding the GUID of the database delete X.Single folder or rename it.
  3. If you have several servers, please repeat these steps to each server.

Once you finish, please start the MS ExchangeFastSearch and HostControllerService Services, then run

Get-MailboxDatabaseCopyStatus * | ft -auto

You will find that you DB in  Crawling status which means that they are in rebuild progress:

You suppose to see under ContentIndexState “Healthy” status. It takes times until it is finished. [Several hours]

It was pretty important for me to share this case with you, BTW it covers also about Exchange 2013 & Exchange 2016, in Exchange 2010 you can run ResetSearchIndex.ps1 -force -all using PowerShell and it knows to fix this as well.