Share via


Query.GetQuerySuggestionsWithResults method

Returns a list of query suggestions matching the search terms typed in the search box.

Namespace:  Microsoft.SharePoint.Client.Search.Query
Assembly:  Microsoft.SharePoint.Client.Search (in Microsoft.SharePoint.Client.Search.dll)

Syntax

'Declaration
Public Function GetQuerySuggestionsWithResults ( _
    iNumberOfQuerySuggestions As Integer, _
    iNumberOfResultSuggestions As Integer, _
    fPreQuerySuggestions As Boolean, _
    fHitHighlighting As Boolean, _
    fCapitalizeFirstLetters As Boolean, _
    fPrefixMatchAllTerms As Boolean _
) As ClientResult(Of QuerySuggestionResults)
'Usage
Dim instance As Query
Dim iNumberOfQuerySuggestions As Integer
Dim iNumberOfResultSuggestions As Integer
Dim fPreQuerySuggestions As Boolean
Dim fHitHighlighting As Boolean
Dim fCapitalizeFirstLetters As Boolean
Dim fPrefixMatchAllTerms As Boolean
Dim returnValue As ClientResult(Of QuerySuggestionResults)

returnValue = instance.GetQuerySuggestionsWithResults(iNumberOfQuerySuggestions, _
    iNumberOfResultSuggestions, fPreQuerySuggestions, _
    fHitHighlighting, fCapitalizeFirstLetters, _
    fPrefixMatchAllTerms)
public ClientResult<QuerySuggestionResults> GetQuerySuggestionsWithResults(
    int iNumberOfQuerySuggestions,
    int iNumberOfResultSuggestions,
    bool fPreQuerySuggestions,
    bool fHitHighlighting,
    bool fCapitalizeFirstLetters,
    bool fPrefixMatchAllTerms
)

Parameters

  • iNumberOfQuerySuggestions
    Type: System.Int32

    Specifies the number of query suggestions the user would like to receive.

  • iNumberOfResultSuggestions
    Type: System.Int32

    Specifies the maximum number of suggestions to return.

  • fPreQuerySuggestions
    Type: System.Boolean

    Specifies whether pre-query suggestions should be returned.

  • fHitHighlighting
    Type: System.Boolean

    Specifies whether parts of the query suggestion returned should be hit-highlighted.

  • fCapitalizeFirstLetters
    Type: System.Boolean

    Specifies whether the first letter in the query suggestion should be capitalized.

  • fPrefixMatchAllTerms
    Type: System.Boolean

    Specifies if the suggestions returned should be prefix matched with the query text.

Return value

Type: Microsoft.SharePoint.Client.ClientResult<QuerySuggestionResults>
The list of query suggestions.

See also

Reference

Query class

Query members

Microsoft.SharePoint.Client.Search.Query namespace