Rebuild Search Index Path Using Regedit

This guide explains how to change the Windows Search catalog data path and trigger a complete index rebuild directly through the Windows Registry Editor (regedit). Modifying the index path via the registry is useful when the Windows Search service fails to rebuild through the standard Control Panel interface, when you need to recover from catalog corruption, or when you want to migrate search index files to a different drive to save space.

Step 1: Stop the Windows Search Service

Before editing registry keys related to indexing, you must stop the search service to prevent file locks or data corruption.

  1. Press Win + R, type services.msc, and press Enter.
  2. Scroll down to locate Windows Search.
  3. Right-click Windows Search and select Stop.

Alternatively, open Command Prompt as an administrator and run:

net stop wsearch

Step 2: Modify the Catalog Path in Registry Editor

  1. Press Win + R, type regedit, and press Enter to open the Registry Editor.

  2. In the address bar at the top, navigate to the following path:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search
  3. In the right pane, locate the string value named DataDirectory.

  4. Double-click DataDirectory to edit its value.

  5. In the Value data field, enter the full path where you want the search catalog to be stored (for example, D:\SearchIndex\ or the default location %ProgramData%\Microsoft\Search\Data\).

  6. Click OK to save the changes.

Note: Ensure the target directory exists and has appropriate read/write permissions for the SYSTEM and Administrators groups.

Step 3: Trigger a Catalog Reset and Rebuild

To force Windows Search to treat the catalog as new and initiate a clean rebuild in the specified location:

  1. Stay in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search registry key.
  2. Look for the DWORD (32-bit) value named SetupCompletedSuccessfully.
  3. Double-click it and change its Value data from 1 to 0.
  4. Click OK.

Setting this value to 0 tells Windows that initial search setup is incomplete, forcing the service to recreate the search catalog database from scratch in the path specified by the DataDirectory key upon its next startup.

Step 4: Restart the Windows Search Service

  1. Open Command Prompt as an administrator.

  2. Run the following command:

    net start wsearch
  3. Windows Search will now initialize, create the database files (such as Windows.edb) in your new catalog path, and automatically rebuild the index in the background.