ISearchQueryHelper interface
Provides methods for building a query from user input, converting a query to Windows Search SQL, and obtaining a connection string to initialize a connection to the Window Search index.
Members
The ISearchQueryHelper interface inherits from the IUnknown interface. ISearchQueryHelper also has these types of members:
Methods
The ISearchQueryHelper interface has these methods.
| Method | Description |
|---|---|
| GenerateSQLFromUserQuery |
Generates a SQL query based on a client-supplied query string expressed in either Advanced Query Syntax (AQS) or Natural Query Syntax (NQS). |
| get_ConnectionString |
Returns the OLE DB connection string for the Window Search index. |
| get_QueryContentLocale |
Gets the LCID for the query. |
| get_QueryContentProperties |
Gets the list of properties included in the query when search terms do not explicitly specify a property. |
| get_QueryKeywordLocale |
Gets the LCID for the locale to use when parsing Advanced Query Syntax (AQS) keywords. |
| get_QueryMaxResults |
Gets the maximum number of results to be returned by the query. |
| get_QuerySelectColumns |
Gets the columns (or properties) requested in the SELECT statement of the query. |
| get_QuerySorting |
Gets the sort order for the query result set. |
| get_QuerySyntax |
Gets the syntax of the query. |
| get_QueryTermExpansion |
Gets the value that specifies how query terms are to be expanded. |
| get_QueryWhereRestrictions |
Gets the restrictions appended to a query in WHERE clauses. |
| put_QueryContentLocale |
Sets the LCID of the query. |
| put_QueryContentProperties |
Sets the properties to include in the query if search terms do not explicitly specify properties. |
| put_QueryKeywordLocale |
Sets the LCID for the locale to use when parsing Advanced Query Syntax (AQS) keywords. |
| put_QueryMaxResults |
Sets the maximum number of results to be returned by a query. |
| put_QuerySelectColumns |
Sets the columns (or properties) requested in the select statement. |
| put_QuerySorting |
Sets the sort order for the query result set. |
| put_QuerySyntax |
Sets the syntax of the query. |
| put_QueryTermExpansion |
Sets a value that specifies how query terms are to be expanded. |
| put_QueryWhereRestrictions |
Sets the restrictions appended to a query in WHERE clauses. |
| WriteProperties |
Not implemented. |
Remarks
This interface is obtained by calling ISearchCatalogManager::GetQueryHelper. Implement this interface as a helper class to ISearchCatalogManager.
This interface facilitates the generation of SQL queries using Advanced Query Syntax (AQS) or Natural Query Syntax (NQS). Clients can submit the SQL query to the Window Search engine by using OLE DB or Microsoft ActiveX Data Objects (ADO).
ISearchQueryHelper::GenerateSQLFromUserQuery uses regional locale settings. However, ISearchQueryHelper does not use the regional locale settings. As a result, there are inconsistencies in the SQL returned from ISearchQueryHelper::GenerateSQLFromUserQuery and ISearchQueryHelper for region specific settings such as date formats, for example.
The DSearch code sample, available on Code Gallery and the Windows 7 SDK, demonstrates how to create a class for a static console application to query Windows Search using the Microsoft.Search.Interop assembly for ISearchQueryHelper.
Requirements
|
Minimum supported client |
Windows XP with SP2, Windows Vista [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 with SP1 [desktop apps only] |
|
Redistributable |
Windows Desktop Search (WDS) 3.0 |
|
Header |
|
|
IDL |
|
See also