If the search in Outlook Web Access, or Outlook on the Web, no longer works, a broken index is usually to blame. However, the index can be recreated quite easily and in most cases this solves the problem.
You can find out whether the index should be recreated using the Exchange Management Shell:
Get-MailboxDatabaseCopyStatus | ft name,contentindexstate -AutoSize
The command above lists the databases and shows the status of the index. If the value "FailedAndSuspended" or "Failed" is displayed in the "ContentIndexState" column, this means that the index is not complete or incomplete. In this case, the index should be recreated.
There are two ways to recreate the index. If a DAG is used, the index can simply be transferred from another mailbox server using the following command:
Update-MailboxDatabaseCopy Test-MBX\KAPUTTERSERVER -CatalogOnly
If no DAG is used, the index can be rebuilt in the following way. The following procedure also works if there is no intact index on all mailbox servers within the DAG.
To completely recreate the index, the following services must first be stopped
- Microsoft Exchange search
- Microsoft Exchange Search Host Controller
As soon as the services are terminated, the index directory in the mailbox database directory can be renamed or deleted. The directory can be quickly determined using the Exchange Management Shell:
Get-MailboxDatabase DB2013 | ft edbfilepath
In this case, the index is located in the directory "d:\DB2013", in the database folder there is a folder for the index that contains the database GUID in the folder name:
This folder can now be renamed or deleted. The two Exchange services can then be restarted. The index will now be recreated. Depending on the size and number of elements within the database, this can take quite a while.
After the services have been restarted, the folder for the index is automatically recreated:
The status can be checked using the Exchange Management Shell:
Get-MailboxDatabaseCopyStatus DB2013 | ft name,contentindexstate -AutoSize
Once the index has been successfully created, the value "Healthy" is displayed in the "ContentIndexState" column.