Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Search
Windows Search
Overview
 Windows Search as a Development Pla...

  Switch on low bandwidth view
Windows Search as a Development Platform

Third-parties can create applications which query the index for data programmatically, and can extend Windows Search to index data from custom file formats and data stores. To do this, third-party developers need to download the Windows SDK for Windows Vista and .NET Framework for the Windows search libraries. The Windows Search SDK Samples contains a variety of useful code samples as well as an interop assembly for developing with managed code. See Windows Search Code Samples for more information on using the code samples.

Querying Data

Developers writing applications on top of the combined Windows Search and Windows property system can easily access files and items regardless of application or file type through the unified data layer as well as add new data sources to the index. Querying applications send Windows Search Structured Query Language (SQL) queries to the Windows Search OLE DB provider to retrieve results. Queries can be constructed manually or with the ISearchQueryHelper interface to generate the SQL from search keywords and Advanced Query Syntax.

Another option is the search-ms:// and search:// protocols which execute URL-based searches rendered through Microsoft Windows Explorer. This option is the lightest-weight development but does not return results or user selections from the results view to the calling application. Also, like other protocol, 3rd party search applications can take over the search-ms:// and search:// protocols if they conform to the required feature set.

For more information on querying the index using any of these methods, refer to Querying the Index Programmatically.

Managing Indexing

Application developers can control the scope and frequency of the data indexed by Windows Search using various management interfaces. These interfaces include functionality to add and remove the directories that the indexer scans for changes, manually notify the index of changes to data, check the status of the indexer, and forcing re-indexing of some or all data.

For more information on managing the index, refer to Managing the Index.

Indexing Files and Items

The index can be extended with property handlers and filters to expose the content and properties of new file formats to the index and Windows Explorer. Property handlers enumerate, get and set properties for specific file types identified by file extension, while filters expose the textual content of those files.

For more information on extending the index, refer to Extending the Index.

Indexing Data Stores

The index can be extended with protocol handlers to provide access to proprietary data stores. For example, files and items contained in non-file-system data stores (such as databases and e-mail stores) require a protocol handler to enumerate their URLs. The items are then individually indexed using the proper filter and/or property handler.

For more information on extending the index, refer to Extending the Index.

Integrating with the Windows Property System

The property system introduced in Windows Vista and available on Windows XP with Windows Search enables metadata to be stored and retrieved for items such as files, e-mail, and contacts. Metadata in this system is represented by a set of properties implemented as name/value pairs which are identified by their canonical name (such as System.Document.LastAuthor) or their property key (a pair of values uniquely identifying each property).

An extensive list of common properties is included for a number of common item types such as photos, music, documents, messages, contacts, and files. Developers can also introduce their own properties to the platform if no existing property meets their needs.

For more information on integrating with the property system, refer to Developing Property Handlers for Windows Search. For more incormation on Windows prpoerties, refer to System Properties.

Windows Search MSDN Forum

There are two Windows Search MSDN Forums, community-supported question and discussion message boards, that developers might find helpful. One is in the Vista forum catagory and the other is in the Windows Search Technologies category:

Related Topics

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker