General Reset and Rebuild Search Index in Windows 11

  • Staff
Search_indexer_banner.png

Indexing the content of your PC helps you get faster results when your searching it for files, emails, or other local content.

The search index only includes your selected locations by default. These locations can be filtered for what file types (extensions), file properties, and file contents you want indexed.

You can choose to use Classic or Enhanced search indexing mode for where your PC will search for files.

The index uses the Windows Search service and runs as the Searchindexer.exe process in the background. The index will automatically rebuild and update for changes made to the included locations since the last index rebuild to increase search result accuracy.

By default, the search indexer backoff feature will reduce indexing speed while rebuilding the index when there is user activity, and will automatically continue at full speed when no user activity is detected.

If you are getting search results that are missing, no longer valid, or incorrect, then the search index may not be up to date. You can rebuild the index to force it to update now. You can also reset search index locations to default before rebuilding the search index.

This tutorial will show you how to manually reset and rebuild the search index for accurate search results in Windows 11.


You must be signed in as an administrator to reset and/or rebuild the index.



Contents






OPTION ONE

Rebuild Search Index in Indexing Options


1 Open Settings (Win+I).

2 Click/tap on Privacy & security on the left side, and click/tap on Searching Windows on the right side. (see screenshot below)

Rebuild_search_Settings-1.png

3 Click/tap on Advanced indexing options under Related settings. (see screenshot below)

Rebuild_search_Settings-2.png

4 You can now close Settings if you like.

5 Click/tap on Advanced. (see screenshot below)

Rebuild_search_Settings-3.png

6 Click/tap on Rebuild. (see screenshot below)

Rebuild_search_Settings-4.png

7 Click/tap on OK to confirm. (see screenshot below)

Rebuild_search_Settings-5.png

8 Indexing will now be in progress. (see screenshot below)

Rebuilding the index might take a long time to complete. If needed, you can click/tap on Pause to stop rebuilding the index.


Rebuild_search_Settings-6.png

9 When indexing has completed, click/tap on Close. (see screenshot below)

Rebuild_search_Settings-7.png





OPTION TWO

Rebuild Search Index using BAT file


1 Click/tap on the Download button below to download the .bat file below.

Rebuild_Search_Index.bat


(Content of BAT file for reference)
Code:
@echo off
sc config wsearch start= disabled
net stop wsearch
del "%ProgramData%\Microsoft\Search\Data\Applications\Windows\Windows.edb"
:wsearch
sc config wsearch start= delayed-auto
net start wsearch
IF NOT %ERRORLEVEL%==0 (goto :wsearch) ELSE goto :END
:END

2 Save the .bat file to your desktop.

3 Unblock the .bat file.

4 Right click or press and hold on the .bat file, and click/tap on Run as administrator.

5 When prompted by UAC, click/tap on Yes to approve.

6 The search index will now start to rebuild in the background.





OPTION THREE

Reset and Rebuild Search Index using BAT file


This option will reset search index locations to default, and then rebuild the search index.


1 Click/tap on the Download button below to download the .bat file below.

Reset_and_Rebuild_Search_Index.bat


(Content of BAT file for reference)
Code:
@echo off
sc config wsearch start= disabled
net stop wsearch
REG ADD "HKLM\SOFTWARE\Microsoft\Windows Search" /v SetupCompletedSuccessfully /t REG_DWORD /d 0 /f
del "%ProgramData%\Microsoft\Search\Data\Applications\Windows\Windows.edb"
:wsearch
sc config wsearch start= delayed-auto
net start wsearch
IF NOT %ERRORLEVEL%==0 (goto :wsearch) ELSE goto :END
:END

2 Save the .bat file to your desktop.

3 Unblock the .bat file.

4 Right click or press and hold on the .bat file, and click/tap on Run as administrator.

5 When prompted by UAC, click/tap on Yes to approve.

6 The search index will now start to rebuild in the background.


That's it,
Shawn Brink

 

Attachments

  • Search_indexer.png
    Search_indexer.png
    11.3 KB · Views: 3
  • Rebuild_Search_Index.bat
    430 bytes · Views: 5
  • Reset_and_Rebuild_Search_Index.bat
    531 bytes · Views: 2
Last edited:
Top Bottom