Special Edition Using Microsoft Windows XP Professional (3rd Edition)
Windows XP comes with a text-search system called the Indexing Service. This system scans files and folders on your hard disk and builds a database of the words it finds in them. This database helps speed up the Search for Files and Directories option when you're looking for words within files or keywords in file descriptions and helps the Internet Information Services Web server perform Web site searches. You can also query the index directly. NOTE Right off the bat, I should reassure you that the Indexing Service pays attention to file privileges when it displays results of searches. It never reports a match for a file the person searching doesn't have permission to view. Managing the Indexing Service
To view the Indexing Service Manager, open Computer Management from Administration Tools, expand Services and Applications, and then select Indexing Service (as shown in Figure 29.10). Under Indexing Service, the manager displays any catalogs defined on your system. A catalog is a self-contained index for a folder or group of folders. By default, a System catalog is defined for use by Search for Files and Folders. If you've installed Internet Information Services, you also have a Web index, which can be used by scripts to let visitors to your Web site search its pages. Figure 29.10. The Indexing Service Manager displays all defined index catalogs.
If you want to use the Indexing Service, select Indexing Service in the left pane, and choose Action, Start from the menu. Answer Yes to Do You Want the Indexing Service to Start Whenever You Boot Your Computer? Choosing Yes starts the service, which immediately begins its job of cataloguing files on your hard drive. It does its job of scanning files periodically from now on, as long as the computer is turned on. Indexing Service Properties
You can right-click the Indexing Service entry in Computer Management to adjust the service's global properties. The Generation tab has some useful settings, as shown in Table 29.1.
Catalog Properties
By default, the Indexing Service Properties settings apply to each catalog managed by the Indexing Service. However, you can select the Properties sheet for each individual catalog by right-clicking the catalog name in the left pane and selecting Properties (in Figure 29.10, the catalog is named "System"). Then you can uncheck Inherit Above Settings from Service on the Generation tab and customize them on a catalog-by-catalog basis. A good use of this capability would be to enable abstracts for the Web index if you have installed Internet Information Services and use searching on your Web site. NOTE Under each catalog is an entry named Properties, but it is a display page only. To change the catalog's properties, you have to right-click its name in the left pane. Catalog Directories
You can control which directories (drives and folders) are included in and excluded from a catalog by using the Directories folder. Under any catalog name in the left pane, select the Directories entry, and view the cataloged folders in the right pane. Here, you can add any additional drives to include in your index and add any folders you want to exclude from the index. To add an Include or Exclude entry, right-click in the right pane, and select New, Directory. In the resulting dialog, enter the full path to the folder to be indexed, or use X:\to add the entire drive X:. Check Yes or No under Include in Index. If you want to add a directory on a remote computer, enter its full UNC network namefor example, \\machine\sharename\folderand a username and password to be used to access the shared folder. Controlling Indexing of Individual Files
You can also remove files or folders from all catalogs by using the files' or folders' Properties sheets. To exclude a file from any catalogs, right-click the file or folder, and select Properties, Advanced. Under Archive and Index attributes on the resulting dialog, you can uncheck For Fast Searching, Allow Indexing Service to Index This File or Folder. Unchecking this box prevents the Indexing Service from ever scanning the file. However, just checking the box is not enough to put the file into an index; the folder must be listed in the catalog's Directories list or in a subfolder of a listed folder. Using the Indexing Service
The System catalog is used automatically by the All Files and Folders search option accessed through the Search item on the Start menu, and it's especially handy when you're searching for a keyword or specific file type. The index is used to hasten the search of any cataloged folder. The Web folder is used by scripts or FrontPage extensions on the Internet Information Server, which is described in Chapter 13, "Hosting Web Pages with Internet Information Services." You also can search any catalog directly from the Indexing Service Manager. Select Query the Catalog in the left pane, and a search form appears in the right. Enter any desired keywords, and click Search to begin a query. I was surprised to find that my system's temporary Internet files are included in the catalog, as test queries returned matches based on words in Web pages I had recently visited. |