SearchServiceApplication.GetQuerySuggestionsWithResults method

Returns a collection of query suggestions that match the specific search terms.

Namespace:  Microsoft.Office.Server.Search.Administration
Assembly:  Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)

Syntax

'Declaration
Public Function GetQuerySuggestionsWithResults ( _
    properties As QueryProperties, _
    iNumberOfQuerySuggestions As Integer, _
    iNumberOfResultSuggestions As Integer, _
    fPreQuerySuggestions As Boolean, _
    fHitHighlighting As Boolean, _
    fCapitalizeFirstLetters As Boolean, _
    fPrefixMatchAllTerms As Boolean _
) As QuerySuggestionResults
'Usage
Dim instance As SearchServiceApplication
Dim properties As QueryProperties
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 QuerySuggestionResults

returnValue = instance.GetQuerySuggestionsWithResults(properties, _
    iNumberOfQuerySuggestions, iNumberOfResultSuggestions, _
    fPreQuerySuggestions, fHitHighlighting, _
    fCapitalizeFirstLetters, fPrefixMatchAllTerms)
public QuerySuggestionResults GetQuerySuggestionsWithResults(
    QueryProperties properties,
    int iNumberOfQuerySuggestions,
    int iNumberOfResultSuggestions,
    bool fPreQuerySuggestions,
    bool fHitHighlighting,
    bool fCapitalizeFirstLetters,
    bool fPrefixMatchAllTerms
)

Parameters

  • iNumberOfQuerySuggestions
    Type: System.Int32

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

  • iNumberOfResultSuggestions
    Type: System.Int32

    Specifies the maximum number of suggestions to return.

  • fPreQuerySuggestions
    Type: System.Boolean

    true to return the pre-query suggestions; otherwise, false.

  • fHitHighlighting
    Type: System.Boolean

    true to highlight the returned query suggestion; otherwise, false.

  • fCapitalizeFirstLetters
    Type: System.Boolean

    true to capitalize the first letter in the query suggestion; otherwise, false.

  • fPrefixMatchAllTerms
    Type: System.Boolean

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

Return value

Type: Microsoft.Office.Server.Search.Query.QuerySuggestionResults
The list of query suggestions.

See also

Reference

SearchServiceApplication class

SearchServiceApplication members

Microsoft.Office.Server.Search.Administration namespace