SharePoint 2013 Search and Search Index Problems

If you find yourself in a situation where your search does not work you have some options:

  1. Do a full crawl
  2. Reset the search index and Do a full crawl
  3. Maybe along the way restart the SharePoint search service and/or the SharePoint timer service
  4. 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:

  1. Find the the folder named with a GUID which has cache.ini file under the C:\ProgramData\Microsoft\SharePoint\Config
  2. Stop SharePoint Server Search 15 and SharePoint Timer Services
  3. Backup the cache.ini file
  4. Delete all files except the cache.ini file
  5. Edit the cache.ini and make sure it has only 1
  6. Save and Close the file.
  7. Start SharePoint Server Search 15 and SharePoint Timer Services
  8. Start Index Reset from SharePoint Central Administration\Application Management\Manage Service Applications\SearchServiceApplication\Index Reset
  9. 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.
  10. 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:

https://spcachecleaner.codeplex.com/

Hope this helps someone. I know I have spent enough time with this problem and it is anoying.

 

SharePoint 2013 display templates for content webparts do not work

This problem may occur when you have a custom display template which you are modifying at some stage and updating it into SharePoint. If for some reason your template stops working what you need to do is go to the display template and modify its properties.

There you will find several options where you want this template to be used, such as search, content webparts etc.

So go and check your display templates properties and make sure you have selected where the template is to be used.