ISearchQueryHelper::put_QuerySyntax Method

Sets the syntax of the query.

Syntax

HRESULT put_QuerySyntax(      
    SEARCH_QUERY_SYNTAX querySyntax
);

Parameters

  • querySyntax
    [in] Flag that specifies the search query syntax. For a list of possible values, see the description of the SEARCH_QUERY_SYNTAX enumerated type.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

The allowed syntaxes are Simple, Natural Query Syntax (NQS), and Advanced Query Syntax (AQS). If not set, the default query syntax is SEARCH_ADVANCED_QUERY_SYNTAX.

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.

See Also

ISearchQueryHelper::get_QuerySyntax, SEARCH_QUERY_SYNTAX