Understanding the FANCI Attribute
When the FILE_ATTRIBUTE_NOT_CONTENT_INDEXED attribute (also known as the FANCI bit) is set on a file, only basic properties of the file will be indexed-the file's contents will not be indexed, even if the location is an indexed location. Removing this attribute (by selecting the check box) allows the file to be indexed if it is in an indexed location, but it does not automatically make that location an indexed location. The attribute never indicates whether a file is indexed, only whether it should be indexed if it is in an indexed location. The order of operation at indexing time is to look in the set of indexed locations and then to index only items that do not have the FANCI attribute set. If the attribute is set (or removed) on an item outside of an indexed location, it has no effect.
Just to be clear: to set the FANCI bit on a file (or folder or volume), right-click the item, select Properties, click Advanced, and clear the check box labeled Index This File [or Folder or Volume] For Faster Searching. To clear the FANCI bit on the item, right-click and select Properties, and select the check box. You can also toggle the FANCI bit using the attrib +i command from the command prompt.
If the FANCI bit is set as an attribute on a folder (or drive), you will be given the option to either set only the attribute on the root location or to also cascade the change down to all subfolders and files. In addition, any new files created within the directory will inherit the folder FANCI bit. Existing files that are copied into the directory, however, will retain the current state of their FANCI bit (set or cleared). You can also set the attribute on a directory and, when applying the change, have it propagate recursively to all descendent files and folders.
Note that selecting the Index This Drive [or Folder] For Faster Searching check box for a volume or directory only enables the Windows Search service to index the volume or directory; it doesn't actually cause the contents of the volume or directory to be indexed. To do that, you need to add the volume or directory to the list of indexed locations using Indexing Options in Control Panel. For example, if you want to index the contents of a volume or directory, open Indexing Options in Control Panel, click Modify, and examine the check box under Change Selected Locations for the volume or directory. If the check box is selected, the volume or directory is already being indexed. If the check box is cleared but available, the volume or directory is not yet being indexed. To index the volume or directory, select the check box and then click OK. If the check box is cleared and the volume or directory name appears dimmed (unavailable), this is because either Group Policy is preventing indexing of the location or the FANCI bit is set for the location. The location will appear dimmed regardless of the check box being checked or cleared, but this doesn't mean it is unavailable for indexing. To determine whether this is due to the FANCI bit being set, place your mouse over the volume or directory name to reveal text that calls out whether the FANCI bit is preventing indexing of the contents of this location.
To index the volume or directory, right-click the dimmed volume or directory name and select Properties, then click Advanced and select the Index This Drive [or Folder] For Faster Searching check box. Close all properties pages by clicking OK several times, then reopen the Indexed Locations dialog box from Indexing Options and select the check box for the volume or directory.
Be cautious about changing the FANCI attribute for locations that by default have the FANCI bit set, because this can have a negative impact on the indexer. Some locations (such as the location for indexer data files, \ProgramData\Microsoft\Search) should never have the FANCI bit removed. Other locations, such as the ProgramData directory, may contain files that get updated on a very frequent basis. Having these files within the indexing scope will cause the indexer to index them each time they are updated, and this could adversely impact system performance.
A quick way to see all files that have the FANCI bit set for a drive is to use the dir command. For example, to find all FANCI files under the C:\Test directory and all subdirectories, you can run dir C:\Test /AI /S from an elevated command prompt. If you have a large number of files or a big directory structure that you want to parse across, you can output the results to a file such as C:\Fanci.txt by running dir C:\Test /AI /S >C:\fanci.txt from an elevated command prompt.
In this tutorial:
- Managing Search
- Search and Indexing Enhancements
- Search in Windows XP
- Search in Windows Vista
- Search in Windows 7
- Understanding the Windows Search Versions
- Search Versions Included in Windows 7 and Windows Vista
- Search Versions Included in Windows Server 2008
- Search Versions Available for Earlier Versions of Windows
- How Windows Search Works
- Understanding Search Engine Terminology
- Windows Search Engine Processes
- Enabling the Indexing Service
- Windows Search Engine Architecture
- Understanding the Catalog
- Default System Exclusion Rules
- Understanding the FANCI Attribute
- Default Indexing Scopes
- Initial Configuration
- Understanding the Indexing Process
- Modifying IFilter Behavior
- How Indexing Works
- Rebuilding the index
- Viewing Indexing Progress
- Understanding Remote Search
- Managing Indexin
- Configuring the Index
- Configuring the Index Location Using Group Policy
- Configuring Indexing Scopes and Exclusions Using Group Policy
- Configuring Offline Files Indexing
- Configuring Indexing of Encrypted Files
- Configuring Indexing of Encrypted Files Using Control Panel
- Configuring Indexing of Similar Words
- Configuring Indexing of Text in TIFF Image Documents
- Other Index Policy Settings
- Using Search
- Configuring Search Using Folder Options
- Configuring What to Search
- Configuring How To Search
- Using Start Menu Search
- Searching Libraries
- Advanced Query Syntax
- Using Federated Search
- Deploying Search Connectors
- Troubleshooting Search and Indexing Using the Built-in Troubleshooter