Subscribe to Windows IT Pro
June 13, 2000 08:07 AM

Indexing Service at Your Fingertips

Windows IT Pro
InstantDoc ID #8935
Rating: (0)

After you create a catalog, you can add the directories or other items that a user will search. You can dynamically add the catalog directories while the service is running. To add a directory to a catalog, right-click the catalog folder and select New, Directory from the shortcut menu. Then, fill in the path to the directory or enter the Uniform Naming Convention (UNC) name and click OK. You need to enter a username and password only when the directory you're accessing requires authorization. Indexing Service respects and uses the Win2K security system; therefore, the service won't list in its results files that users don't have permission to access.

After you add a directory, Indexing Service indexes it. NTFS uses an Update Sequence Number Changed attribute on files, which lets the service check only modified files.

You can also index Web files. To set up a Web index, right-click the catalog to which you want to add the Web index and select Properties. From the Properties dialog box, select the Tracking tab, then from the WWW Server drop-down list, select the Web server that you want to index. Figure 2 shows the Default Web Site server selected as the WWW Server. After you select the Web server, click OK and stop and restart Indexing Service. Then, the service will pull the entries from the Web site, as Figure 3 shows. You can see that the KensDocs catalog contains the My Documents folder, and the service pulls all the virtual directories from the Default Web Site server. Don't place the catalog for the Web server in a Web root or virtual directory because IIS can lock the catalog and prevent updates.

You can also use the service to generate document abstracts. If you've performed a search at http://www.microsoft.com, you've seen the result of abstract generation. Each document in the results list contains a short abstract. To force Indexing Service to generate abstracts for you, open the catalog's Properties dialog box, select the Generation tab, then select the Generate Abstracts option. The default maximum size for an abstract is 320 characters. You can change this number in the Maximum size box on the Generation tab. By default, each catalog will inherit its properties from the Indexing Service properties. To set the properties for a particular catalog, clear the Inherit above settings from Service check box on the Generation tab.

You can also use the Indexing Service MMC snap-in to delete catalogs. To delete a catalog, stop Indexing Service, select the catalog to delete, press the Delete key, and restart the program.

You can also search a catalog in the MMC. Open the Query the Catalog page, and enter your query. This feature makes testing and looking for items in a catalog a snap when you're maintaining a catalog. If you try to query a catalog before you start Indexing Service, you'll receive the error message Service is not running.

Index Files
One key but overlooked aspect of using an index service is the file properties that the service indexes. To index an Office document, Indexing Service reads the file's properties, but for the service to read the properties correctly, the file's creator or maintainer must have filled them in. To add properties for an Office file, you can use the File menu Properties dialog box. To automatically display the dialog box when a user saves a new file, select Microsoft Word's Tools menu, then select Options, the Save tab, and the Prompt for document properties check box. The location of this option varies throughout the Office applications.

For Web files, file developers need to supply the proper meta tags so that the service can properly pick up the data. Indexing Service uses several meta tags, which Table 2 shows, that map to properties. You can search the Web for the term meta tag to find numerous sites that provide information about HTML meta tags.

Developer Applications
Software developers can write applications that work with the Indexing Service in a variety of ways. Developers can write filter applications, but they can also create applications that use the service's query features. These applications provide an easy-to-use interface with which users can search directly from the application.

The Microsoft Developer Network (MSDN) provides information about application development for Indexing Service. The Programming for Indexing Service chapter of MSDN's online book Platform SDK shows how to perform Indexing Service tasks in different programming languages.

Indexing Service is a useful tool that provides access to different types of documents. The service's integration ability lets you incorporate the search features into any application. Microsoft also made the Win2K service easy to use by including it in the installation and integrating it into the search function and file system.

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.