Querying the Index with Windows Search SQL Syntax
Windows Search provides content crawling and search features that support full-text searching. The query language used by Windows Search extends the standard SQL-92 and SQL-99 database query syntax to enhance its usefulness with text-based searches.
All features of Windows Search Structured Query Language (SQL) are compatible with Windows Search on Windows Vista, and later, including all versions of Windows 10.
This section provides an overview of SQL syntax in Windows Search, and includes the following topics:
- Overview of Windows Search SQL Syntax
- General Query Language Information
- GROUP ON ... OVER... Statement
- SELECT Statement
- FROM Clause
- WHERE Clause
- ORDER BY Clause
- RANK BY Clause
- SET Statement
- Rowset Properties
This documentation assumes familiarity with Object Linking and Embedding Database (OLE DB), and SQL.
Code samples
The WSSQL code sample demonstrates how to communicate between Microsoft OLE DB and Windows Search through SQL. The WSOleDB code sample illustrates Active Template Library (ATL) OLE DB access to Windows Search applications, and two additional methods for retrieving results from Windows Search. Both samples are available in the Windows Search Samples and the Windows 10 SDK
Related topics
Querying the Index Programmatically
Using SQL and AQS Approaches to Query the Index
Querying the Index with ISearchQueryHelper
Querying the Index with the search-ms Protocol