Do you miss your search results? Kill’em.

exchangeI’ve had one more case recently: an employee reported that his outlook wouldn’t search any item for the last three weeks or so. Rebuilding indices didn’t help and moreover he was not using cached outlook mode. Well, while my search seemed to be ok, I needed to reproduce the problem somehow, so I went nuts and removed cached mode too. Bingo! My search results were restricted by the period from the same three-weeks-ago and to the beginning of time. No results from yesterday or last week. Considering the fact that mailboxes, both the employee’s and mine were in the same storage group I decided that it was the server index who was responsible for that tragedy (do you know where is each your mail at the moment, by the way?).

How can we check if something is wrong with the index on a server? The answer was easy to find: Test-ExchangeSearch for Exchange 2010 or for 2007. Running the command for my account returned the following:

ResultFound : False
SearchTime : –1

Obviously something went wrong with index. How can we restore it? Again, easy: here is the KB which was found at no time. So I just got to my server and run the script ResetSearchIndex.ps1 for the problematic DB from Exchange folder. Of course, deleting index and recreating it gives a server hard time in terms of processor usage and IO, so I did it in non-working hours. And just in case you, like I, need to know if the index is being rebuilt or has it been rebuilt, you will need to look at a counter for the DB which you are reindexing. The counter is MSExchange Search Indices – Full Mode Crawl Status. You can track it for a particular DB or for _Total. If it is 1 then you have Full Crawl being performed. If it is 0, then crawls have stopped. And after they stopped, you can check again if you have solved your problems with search:

[PS] C:Windowssystem32>Test-ExchangeSearch domainnameusername

                            ResultFound                              SearchTime
                                     ———–                                     ———-
                                            True                                               5

I definitely did =)

Advertisements

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