Windows Search group policy "Prevent indexing of certain file types" stops working when indexer is rebuilt

Applies To: Windows 7, Windows Server 2008 R2

Windows Search group policy, "Prevent indexing of certain file types", stops working when indexer is rebuilt

This article applies to the following operating systems:

  • Windows® 7

  • Windows Server® 2008 R2

Symptoms

The "Prevent indexing of certain file types" Group Policy allows administrators to specify a list of file types that should not be indexed. After the Group Policy is applied, if the indexer is rebuilt, the Group Policy will stop working.

Cause

You can set Group Policies for Windows Search both locally and remotely. To set a policy locally, launch the Local Group Policy Editor by running gpedit.msc. Group Policy's for Windows Search can be found under the Search node in the Local Group Policy Editor.

The following mechanisms will cause the indexer to rebuild.

  1. Performing one of the following actions in the indexing control panel will cause the indexer to rebuild:

    1. Setting/clearing the "Index encrypted files" option

    2. Setting/clearing the "Treat similar words with diacritics as different words" option

    3. Using the rebuild button to rebuild the index

    4. Making any changes on the files types tab that is available in the Advanced Options dialog box.

  2. Enabling or disabling Windows Search group policies will cause the indexer to rebuild. Example policies that cause this include:

    1. Allow the use of diacritics

    2. Allow indexing of encrypted files

  3. Corruption of index files. When the corruption of index files is detected by the indexer, the index will automatically rebuild.

Resolution

The issue can be partially mitigated by the use of Windows Search's "Prevent displaying advanced indexing options in the Control Panel" Group Policy. Enabling this Group Policy will prevent users from performing actions in the Control Panel that will cause the indexer to rebuild. There are no means to prevent other Group Policies from rebuilding the index or preventing an automatic rebuild of the index files when corruption in the index files is detected.

Following a rebuild, the issue can be resolved by restarting the Windows Search service. This can be accomplished by one of the following methods:

  1. Restart the Windows Search service from the Services control panel

  2. Restart the Windows Search service from an elevated command prompt

  3. Restart the Windows Search service by restarting the computer

Once the Windows Search service is restarted the “Prevent indexing of certain file types” Group Policy will work again.

Note

Any files that have already been indexed will remain in the current index despite any set policies until an update is made to these files (modified content, properties changed, etc) that causes the indexer to attempt to reindex.