Optimizing and Processing Queries

[Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.]

An end user, application, or script submits a query to Indexing Service using one of the Query Languages for Indexing Service. The Querying component first optimizes the query for fastest performance or for greatest hit recall, and then returns the resulting documents and locations for matches from the Indexing Service catalog.

The following diagram shows the querying process in detail.

In the diagram, rectangles represent sources and sinks of Indexing Service data, and an ellipse represents an Indexing Service process. The solid lines indicate the flow of data in the direction of the arrows. A rounded, dotted rectangle delineates an Indexing Service component — in this case, the Querying component, which optimizes and processes queries.

An end-user of Indexing Service can query Indexing Service using the Start, Search for Files, or Folder dialog box. An application or script can programmatically query Indexing Service using the methods and properties of the Indexing Service Query Helper automation objects (Query and Utility) or the ActiveX Data Objects (ADO). These programming elements provide properties and methods for selecting catalogs and scopes, provide methods and properties for setting query parameters and query content, and provide methods for executing queries and retrieving the results. Also, the ISAPI extensions for Indexing Service provide programmatic querying of Indexing Service using Internet Data Query (.idq) files. Finally, an application can use the OLE DB Helper functions or the OLE DB Provider for Indexing Service interfaces to execute queries.