If you find yourself in a situation where your search does not work you have some options:
- Do a full crawl
- Reset the search index and Do a full crawl
- Maybe along the way restart the SharePoint search service and/or the SharePoint timer service
- And if none of the above then you have to get creative
In the third option usually you get errors on your search webpart or search results. These errors do not go away and nothing seem to help, like the option one and two above.
One of the last things which you can do before going crazy 🙂 would be to manually empty the configuration cache. You do this in the following way:
- Find the the folder named with a GUID which has cache.ini file under the C:\ProgramData\Microsoft\SharePoint\Config
- Stop SharePoint Server Search 15 and SharePoint Timer Services
- Backup the cache.ini file
- Delete all files except the cache.ini file
- Edit the cache.ini and make sure it has only 1
- Save and Close the file.
- Start SharePoint Server Search 15 and SharePoint Timer Services
- Start Index Reset from SharePoint Central Administration\Application Management\Manage Service Applications\SearchServiceApplication\Index Reset
- You will see your C:\ProgramData\Microsoft\SharePoint\Config\YourGUID folder will be filled up new .xml files and your cache.ini file will be modified.
- Next I run a full search crawl to get some search results.
NOTICE: Do not do this if you are tight on time. Depending on the amount of data in your target environment running a full crawl will take a looon long time. All depends on the server resources and the amount of data in your target environment.
There is also a script from this at codeplex:
Hope this helps someone. I know I have spent enough time with this problem and it is anoying.