Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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.

ISearchQueryHelper Members

GenerateSQLFromUserQuery Generates a Structured Query Language (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 language code identifier (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 taht 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 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.

Interface Information

Inherits from IUnknown
Header and IDL files searchapi.h, searchquery.idl
Minimum operating systems Windows XP Service Pack 2 (SP2) with Windows Desktop Search (WDS) 3.0, Windows Server 2003 Service Pack 1 (SP1) with Windows Desktop Search (WDS) 3.0, Windows Vista

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.