Windows 7 / Getting Started

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.

[Previous] [Contents] [Next]

In this tutorial:

  1. Managing Search
  2. Search and Indexing Enhancements
  3. Search in Windows XP
  4. Search in Windows Vista
  5. Search in Windows 7
  6. Understanding the Windows Search Versions
  7. Search Versions Included in Windows 7 and Windows Vista
  8. Search Versions Included in Windows Server 2008
  9. Search Versions Available for Earlier Versions of Windows
  10. How Windows Search Works
  11. Understanding Search Engine Terminology
  12. Windows Search Engine Processes
  13. Enabling the Indexing Service
  14. Windows Search Engine Architecture
  15. Understanding the Catalog
  16. Default System Exclusion Rules
  17. Understanding the FANCI Attribute
  18. Default Indexing Scopes
  19. Initial Configuration
  20. Understanding the Indexing Process
  21. Modifying IFilter Behavior
  22. How Indexing Works
  23. Rebuilding the index
  24. Viewing Indexing Progress
  25. Understanding Remote Search
  26. Managing Indexin
  27. Configuring the Index
  28. Configuring the Index Location Using Group Policy
  29. Configuring Indexing Scopes and Exclusions Using Group Policy
  30. Configuring Offline Files Indexing
  31. Configuring Indexing of Encrypted Files
  32. Configuring Indexing of Encrypted Files Using Control Panel
  33. Configuring Indexing of Similar Words
  34. Configuring Indexing of Text in TIFF Image Documents
  35. Other Index Policy Settings
  36. Using Search
  37. Configuring Search Using Folder Options
  38. Configuring What to Search
  39. Configuring How To Search
  40. Using Start Menu Search
  41. Searching Libraries
  42. Advanced Query Syntax
  43. Using Federated Search
  44. Deploying Search Connectors
  45. Troubleshooting Search and Indexing Using the Built-in Troubleshooter