Reset and Rebuild Search Index Completely in Windows

0 Shares

When you attempt to search files on your computer using Windows Search via File Explorer or Cortana search, the files you expect to find may not appear in the search results. This happens even though the files exist on the computer. Another situation is that some phantom files appear in search results, whereas you may have deleted the files long back.


This usually happens if the search index hasn’t updated correctly. Here are the possible causes of the problem:

  • Windows Search service fails, showing error 0x80070002 or 0x80070005.
  • The file is not in an indexed location, so searches may run slow.
  • The file type of the file you’re trying to find is not indexed.
  • The file has properties that prevent it from being indexed.
  • The file has no index attribute that prevent it from being indexed.
  • The search indexer has not updated the file in its database.

As Windows Search indexes the details and meta information of every file from included locations, your search queries fetch results in a jiffy every time. This is because Windows Search fetches results from its database file (.edb) rather than searching the file system. When searching non-indexed locations, searches will be accurate but very slow as the system has to scour through every file and folder. Windows Search and the advanced query syntax are awesome features when they work, and indexing is one of the best features Microsoft has added to Windows.

Because every feature in Windows depends upon search indexing, you may face search issues even in Windows 10’s modern Settings user interface. Search Results may turn up empty in Windows 10 Settings Page. This post tells you how to fix these kinds of issues. Instructions in this article should apply to Windows Vista/7 through Windows 10.

Repair Windows Search, Reset and Rebuild the Index Using Search Troubleshooter

Most of the Search Indexing issues can be fixed using the built-in Windows Search Troubleshooter tool. To run the tool, right-click Start, click Run. Type the following command and click OK.

msdt.exe -ep SystemSettings_Troubleshoot_L2 -id SearchDiagnostic

In Windows 10, you can also launch the troubleshooter via Start → Settings → → Update & Security → Troubleshoot → Search and Indexing

Reset and Rebuild Search Index - search troubleshooter

In the troubleshooter window, click Advanced and select Apply repairs automatically if you want the tool to automatically fix your settings. If you just want to do a dry run, have the option unchecked.

Reset and Rebuild Search Index - search troubleshooter

Select all the checkboxes that apply.

Reset and Rebuild Search Index - search troubleshooter

Reset and Rebuild Search Index - search troubleshooter potential issues report

The Search and Indexing troubleshooter checks for the following potential issues:

  • Search Filter Host process failed: Problems with the Search Filter Host might indicate errors in the Windows Search service, which can cause searches to fail or return incomplete search results.
  • Windows Search service shut down unexpectedly: When the Windows Search service is forcibly shut down while performing maintenance, searches might fail or return incomplete search results.
  • Windows Search service shut down unexpectedly: When the Windows Search service is forcibly shut down, searches might fail or return incomplete search results.
  • Windows Search service not running: When the Windows Search service is not running, searches might be slower, and you might not be able to find all items.
  • Windows Search service failed: Problems with the Windows Search service can cause searches to fail or return incomplete search results.
  • Search Protocol Host process failed: Problems with the Search Protocol Host might indicate errors in the Windows Search service, which can cause searches to fail or return incomplete search results.

If necessary, the troubleshooter fixes the NTFS permissions for the Windows Search data folder so that the NT AUTHORITY\SYSTEM account has the required permissions. By default, the search data folder is located at %ProgramData%\Microsoft\Search\Data\. The troubleshooter can also reset the Windows Search settings and force a rebuild of the Search index if deemed necessary.


How to Manually Reset Windows Search and Rebuild the Index

The Search troubleshooter is the most preferred way to troubleshoot search and indexing issues, as it automates many things (depending upon the checkbox options you selected).

However, if you want to manually reset Windows Search, delete and rebuild the index, use these steps:

  1. Start the Registry Editor regedit.exe and go to:
  2. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search
  3. Change the registry value SetupCompletedSuccessfully data from 1 to 0, and restart the Windows Search service.
  4. Reset and Rebuild Search Index -  setupcompletedsuccessfully



    The above registry change SetupCompletedSuccessfully = 0 causes Windows Search to clear custom indexed locations, add default locations and rebuild the index from scratch.

  5. Exit the Registry Editor.
  6. To apply the changes, restart Windows Search service via Services MMC console services.msc, or restart the computer.
  7. Reset and Rebuild Search Index - restart windows search service

Before resetting search, this is how the Indexed Locations dialog looked like, containing many obsolete folder locations:

Reset and Rebuild Search Index - search index included locations

After resetting the search, Included Locations is reset to Windows 10 defaults.

Reset and Rebuild Search Index - search index included locations reset

This resetting method essentially resolves most of the Windows search problems.


How to Rebuild Windows Search Index Without Resetting

The earlier method resets Windows Search locations and forces a rebuild of the index upon next restart, or after restarting the Windows Search service. To rebuild just the index without resetting the indexed folder locations, use these steps:

Click Start, type indexing and click on Indexing Options in search results.

Reset and Rebuild Search Index - indexing options start menu search

In case the Start menu search doesn’t work, you can launch Indexing Options directly by running the following command from Run dialog or Command Prompt.

control srchadmin.dll

In the Indexing Options dialog, click Advanced. Under Troubleshooting section, click Rebuild.

rebuild search index via indexing options

This deletes and rebuilds the index completely.

Reset and Rebuild Search Index - index is rebuilding

Note that if Windows detects user activity in the system, indexing is slowed down drastically. After a couple of minutes of no user activity, indexing continues in full swing. Regardless, when I checked, the searchindexer.exe and its allied processes didn’t use more than 15% of the CPU at any given point in time, even when the system was left idle.

0 Shares

About the author

Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and has a vast experience in Windows — delivering support for Microsoft's consumer products. He has been a Microsoft MVP (2003-2012) who contributes to various Windows support forums.

3 thoughts on “Reset and Rebuild Search Index Completely in Windows”

  1. This is the only thing that worked for me. Windows is so f’ed up, they don’t even know what’s in their software.
    Thank you!!!
    Check out this quote from a help forum:
    “Come on Microsoft! What are you thinking? Is there anyone home?”

Leave a Comment