How to Rebuild the File Explorer Search Index Without Removing Locations on Windows 11
🔍 WiseChecker

How to Rebuild the File Explorer Search Index Without Removing Locations on Windows 11

File Explorer search stops returning results or returns outdated files on Windows 11. This happens when the search index becomes corrupted or outdated. Rebuilding the index normally removes all indexed locations, forcing you to re-add them manually. This article explains how to rebuild the search index while keeping your custom indexed locations intact.

Key Takeaways: Rebuild Windows 11 Search Index Without Losing Custom Locations

  • Control Panel > Indexing Options > Advanced > Rebuild: Resets the index database but preserves your list of indexed folders and file types.
  • Settings > Privacy & security > Searching Windows > Search indexing options: Opens the same Indexing Options window from the modern Settings app.
  • Windows Search troubleshooter in Settings > System > Troubleshoot > Other troubleshooters: Repairs common search issues without modifying indexed locations.

ADVERTISEMENT

How the Windows Search Index Works and Why Rebuilding Helps

Windows Search maintains a local database of file names, file contents, and metadata for folders you specify. This index lets File Explorer return results instantly instead of scanning every file on each search. The index is stored in a hidden folder at C:\ProgramData\Microsoft\Search.

When the index becomes corrupted, search returns incorrect results, no results, or takes minutes to complete. Corruption occurs after a failed Windows update, an unexpected shutdown while indexing was running, or a faulty third-party file manager that writes to the index database. Rebuilding the index creates a fresh database from scratch using the same set of indexed locations.

The standard rebuild process in Indexing Options does not delete your list of indexed folders. It only deletes the cached data inside the database. Your custom locations, file type filters, and excluded folders remain in the Windows Search configuration. The rebuild replaces the old database files with new ones, then starts indexing your folders again.

Steps to Rebuild the Search Index Without Losing Custom Locations

  1. Open Indexing Options
    Press the Windows key and type Indexing Options. Click the result that appears under Control Panel. Alternatively, go to Settings > Privacy & security > Searching Windows and click Search indexing options.
  2. Open Advanced settings
    In the Indexing Options window, click the Advanced button. If User Account Control prompts you, click Yes.
  3. Initiate the rebuild
    In the Advanced Options dialog, under the Index Settings tab, click the Rebuild button. A confirmation message appears: Are you sure you want to rebuild the index? Click OK.
  4. Wait for indexing to complete
    Windows starts rebuilding the index. The Indexing Options window shows Indexing complete once the process finishes. This can take several hours depending on the number and size of indexed files. You can continue using your computer during the rebuild, but search results will be incomplete until the index is rebuilt.
  5. Verify your indexed locations
    After the rebuild completes, click Modify in the Indexing Options window. Ensure all your custom folders are still selected. If any are missing, check the Summary of selected locations list and re-add them by expanding drives and checking folders.

Windows 11 does not remove locations during a rebuild in normal circumstances. If locations disappear after a rebuild, the Windows Search configuration file itself may be corrupted. In that case, use the Windows Search troubleshooter in Settings > System > Troubleshoot > Other troubleshooters before attempting another rebuild.

ADVERTISEMENT

Common Mistakes and Limitations When Rebuilding the Index

Rebuilding from the Settings app does not preserve file type filters

The Settings app lets you add or remove indexed folders but does not expose the file type filter list. If you have configured custom file extensions to be indexed or excluded, those settings are stored in the same Advanced Options dialog. A rebuild does not affect file type filters, but if you use the Reset button instead of Rebuild, your file type filters are reset to defaults. Always use Rebuild, never Reset.

Indexing pauses or stops before completion

Windows Search pauses indexing when the computer is running on battery power or when CPU usage is above 80 percent. If indexing does not finish, check your power plan settings. Go to Settings > System > Power & battery and set the power mode to Best performance temporarily. Also ensure the Windows Search service is running. Press Windows key + R, type services.msc, press Enter, find Windows Search, and verify its status is Running.

Search still returns no results after a rebuild

If the index rebuild completes but search still fails, the issue may be with the search protocol handler or a corrupt registry key. Run the Windows Search troubleshooter from Settings > System > Troubleshoot > Other troubleshooters. If the troubleshooter does not fix the problem, open an elevated Command Prompt and run net stop wsearch && net start wsearch to restart the search service.

Item Rebuild (Recommended) Reset (Avoid)
Deletes index database Yes Yes
Removes custom indexed locations No Yes
Resets file type filters No Yes
Resets excluded folders No Yes
Time to complete Hours Hours

After rebuilding the index, you can monitor progress by opening Indexing Options. The dialog shows the number of items indexed and the current indexing status. For large document collections, consider excluding folders that do not need to be searchable, such as temporary folders or backup archives. To exclude a folder, click Modify in Indexing Options, expand the drive tree, uncheck the folder, and click OK.

Windows 11 also lets you rebuild the index using command-line tools. Open an elevated Command Prompt and run rundll32.exe shell32.dll,Control_RunDLL srchadmin.dll to open Indexing Options. This method is identical to the GUI steps above. The command does not offer any additional options for preserving locations.

A full index rebuild is rarely needed. For most search problems, running the Windows Search troubleshooter or restarting the Windows Search service resolves the issue without rebuilding. Only rebuild when search consistently returns no results or incorrect results after troubleshooting.

ADVERTISEMENT