/
/

How to Reset and Rebuild the Search Index in Windows 10

Reset and Rebuild the Search Index in Windows blog banner image

Key Points

  • What is the Windows Search index
    • A database that stores references to the contents of files, emails, or other data
    • Indexes metadata and file content for faster results.
  • Resetting vs. rebuilding
    • Reset: Restores default search settings and fully reinitializes the index.
    • Rebuild: Deletes and recreates the index while keeping your indexing preferences.
  • Signs your search index needs attention
    • Missing or incomplete search results.
    • Sluggish search performance or system slowdowns.
    • Error messages like “Indexing not complete.”
  • Considerations when fixing the search index
    • Administrator access is required.
    • May temporarily slow system performance.
    • Schedule during off-peak hours to minimize disruption.
  • Methods for rebuilding the search index
    • Control Panel:Indexing Options > Advanced > Rebuild.
    • Custom Locations: Select folders before rebuilding.
    • Batch file script: Advanced manual method for deleting and restarting the index.
  • Methods for resetting the search index
    • Registry Editor: Changing the SetupCompletedSuccessfully to 0.
    • PowerShell script: Using Microsoft’s official ResetWindowsSearchBox.ps1.
  • Common issues
    • Indexing is stuck at 0% or is not progressing.
    • Certain file types are not indexed.
    • Missing search results after rebuild.
    • PowerShell scripts are blocked due to the execution policy.

Resetting the search index in Windows enables quick access to files, applications, and system settings. Over time, the search index can become corrupted or inefficient, leading to incomplete or inaccurate search results. Resetting and rebuilding the search index can resolve these issues and improve search performance. In this guide, IT professionals can follow a step-by-step guide to rebuild the Windows search index using different methods.

Learn how to shift to a proactive IT management strategy.

Read our step-by-step guide today

What is the Windows search index?

The Windows search index is a database that stores references to the contents of files, emails, or other data to speed up search operations. For example, your Windows system can index metadata from a music file, such as the album the song is from, and search for the album’’s name. Indexes are also used by a Windows system to display search suggestions.

Read more about Search Indexing

Resetting vs. rebuilding the Windows search index

Before we proceed, it’s essential to understand the difference between resetting and rebuilding your Windows search index. This way, you would know which one best fits your troubleshooting needs and avoids unnecessary steps.

  • Reset: This restores Windows Search to its default state, resetting service settings and index configuration as if it were freshly installed.
  • Rebuild: Deletes and recreates the index database while keeping your indexing settings (folders, file types, filters).

Both resetting and rebuilding may help fix search issues. However, resetting is more thorough and should be used if rebuilding doesn’t fix search issues.

Signs your search index needs a reset or rebuild

Problems with the search index often arise due to several factors, such as volume corruption, outdated index entries, unresponsive indexing services, or changes in file system structures. Fixing the Windows search index refreshes this database and resolves common search issues.

Here are some symptoms to look out for that indicate you may need to fix your Windows 10 search index:

  • Searches that return incomplete or incorrect results.
  • Using the search function either slows down the system or causes it to freeze.
  • Receiving error messages like “Indexing not complete” or “Search results not showing.”

What to consider when fixing the search index in Windows

Here are some considerations that can help you prepare when resetting or rebuilding the Windows search index:

  • Administrator access is required to allow you to make system-level changes to indexing.
  • To minimize downtime, schedule the process during off-peak hours.
  • Rebuilding the index, particularly if it is running on a resource-constrained Windows device, may temporarily impact system performance
  • Issues with the search function may occur during the rebuilding process, which can also lower productivity.

With all the preparations completed, you can repair the Windows search index with minimal downtime using different methods.

How to rebuild Windows 10 search index

Method 1: Rebuild via the Control Panel

This method will delete the current index and begin rebuilding in the background.

  1. Open Control Panel.
  2. Search for Indexing Options.
  3. Select Advanced.
  4. Under the Troubleshooting section, click Rebuild. Once you confirm the action, your Windows system will start the rebuilding process.

Method 2: Rebuild with Custom Locations

This method enables you to choose the locations being indexed.

  1. Open Control Panel.
  2. Search for Indexing Options.
  3. Select Modifyto add or remove directories based on your workflow.
  4. Once you’ve finalized your selections, click Advanced.
  5. Click Rebuild. A progress status will appear on the Indexing Options screen.
  6. Monitor progress from the Indexing Options window until it’s finished. Pausing the process is also an option but try to avoid shutting down or restarting your computer during this time.

Method 3: Rebuild via a Batch File

For advanced users, you can manually delete the index database and restart the search service using a .bat script. Ensure you have Administrator rights.

  1. Create .bat file with the following code:

@echo off

net stop wsearch

del "%ProgramData%\Microsoft\Search\Data\Applications\Windows\Windows.edb"

:wsearch

net start wsearch

IF NOT %ERRORLEVEL%==0 (goto :wsearch) ELSE goto :END

:END

  1. Right-click on the .bat file and select Run as administrator.
  2. Click Yes when prompted to begin the process.

If rebuilding doesn’t fix search issues, you can try resetting the search index instead.

How to reset Windows 10 search index

Method 1: Reset via Registry Editor

This method forces Windows to reinitialize the Search service, resetting Search to its default configuration and rebuild the index.

⚠️ Warning: Editing the registry improperly can cause system issues. Create a backup before proceeding.

  1. Open the Windows Registry Editor: Press the Windows key + R and type regedit. Hit Enter.
  2. Navigate to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Search
  3. Locate the entry SetupCompletedSuccessfully.
  4. Change its value from 1to 0.
  5. Restart your computer.

Method 2: Reset via PowerShell Script

This method resets the Search function using an official PowerShell script provided by Microsoft Windows 10. Ensure you have Administrator rights.

💡Tip: This PowerShell script also works for Windows 11.

  1. Download the official PowerShell script here.
  2. Right-click the downloaded file and select Run with PowerShell.
  3. Follow on-screen prompts to complete the reset.

What are the risks of resetting the search index in Windows

Resetting and rebuilding the search index on your Windows 10 device does not modify or affect your files in any way. However, it may also bring up minimal issues while the fix is in progress. Here are some of them:

  • The search function may return less relevant results.
  • File searches may be slower until rebuilding is completed.
  • Some search results may also be unavailable during the process.
  • Large systems or drives may take hours to complete rebuilding.

How the search index improves search efficiency in Windows 10

The Windows search allows the system to quickly retrieve search results by indexing metadata and file content, such as terms or properties, without scanning every file in real time. This drastically reduces search times for files, emails, and settings. A fully built index also makes it faster to locate large volumes of data spread across different drives or directories.

Windows 10 search troubleshooting

Here are some common issues you may encounter after resetting or rebuilding the search index and their fixes:

IssuePossible solution
Indexing stuck at 0% or not progressingDelete the contents of the Data folder by navigating to this specific folder: C:\ProgramData\Microsoft\Search\Data. Also, make sure there is enough free disk space to rebuild the search index.
Specific file types are not being indexedReturn to the Advanced Options in Indexing Options and switch to the File Types tab. Verify the desired file type is checked and set to index.
Missing results after rebuildingTry manually check that all important folders are included in the indexed locations. You can also use the Windows Search Troubleshooter to identify and resolve configuration issues:

1. Go to Settings > Update & Security > Troubleshoot.

2. Select Additional Troubleshooters and locate Search and Indexing.

3. Run the troubleshooter and follow the suggested fixes.

PowerShell script blocked by execution policyIf you see the error “Cannot be loaded because running scripts is disabled on this system” after doing Method 5: Reset via PowerShell Script:

1. Open PowerShell as Administrator.

2. Run this command to temporarily allow scripts:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted

3. Run the Reset Windows Search script

4. Run this command to revert policy after completion:

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Restricted

Best practices to optimize search performance on Windows 10

Resetting and rebuilding the search index may fix your search issues, but a proactive approach may also help you maintain optimal search performance. Here are some best practices you can follow:

1. Leverage Windows’s custom indexing options

To improve performance, use search indexing options in your Windows 10 system, such as customizing the rebuilt index to meet your specific needs. Include frequently searched folders. Exclude system files and directories that do not need to be indexed.

2. Manage rebuilding impact

To avoid disrupting users, schedule rebuilding the search index during hours when there is little activity. The rebuild process temporarily leads to slower and less relevant search results.

3. Keep your system and drives optimized

Regularly perform disk cleanup and defragmentation (for HDDs) to ensure the search index can be built efficiently. Low disk space or fragmented drives can slow indexing and affect search performance.

4. Monitor indexed file types and locations

Periodically review the folders and file types included in the index. Remove unnecessary locations or rare file types that aren’t frequently searched. This keeps the index smaller and improves search speed and relevance.

Why reset and rebuild the search index

Resolve search errors:

Repairing your Windows search index can easily fix technical issues such as blank or incomplete search results.

Ensure that new files are indexed:

Optimize search indexing whenever you perform significant system changes, such as moving large file libraries, remapping drives, or installing applications.

Improving performance:

When you repair your Windows search index, you make search results more accurate and relevant. In addition, when you fix your Windows 10 search index, you also speed up the process of searching for files.

Discover how a cloud-based solution can help manage all your devices in one place.

Learn more about NinjaOne Endpoint Management

What to do when Windows 10 search is not working

Resetting and rebuilding the Windows 10 search index is valuable for addressing performance degradation and search-related errors. IT teams should perform this task periodically or when troubleshooting user complaints about search inaccuracies. Whether restoring indexing functionality or resolving specific search issues, maintaining and enhancing the efficiency of Windows Search reduces downtime and improves IT efficiency.

FAQs

It depends on the system and drive size. Rebuilding your Windows search index can take a few minutes to several hours.

No, when you reset your search index for Windows 10, you’re only reorganizing files and index data. This means this process affects no files.

While you can still access the search functionality on your Windows system, failing to reset and rebuild your search index can lead to delays and potential errors in file location.

Yes, you can continue using your system while the index rebuilds, but search results may be slower or incomplete until the process finishes. For best performance, consider running it during low-activity hours.

There’s no fixed schedule, but it’s recommended to rebuild if you notice missing search results, slow searches, or after major system changes such as adding new drives, migrating files, or installing large software updates.

You might also like

Ready to simplify the hardest parts of IT?