SearchServiceApplicationProxy.GetQuerySuggestions method

Returns a collection of query suggestions that match the specified Search terms.

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

Syntax

'Declaration
Public Function GetQuerySuggestions ( _
    properties As QueryProperties, _
    iNumberOfSuggestions As Integer, _
    fPreQuerySuggestions As Boolean, _
    fHitHighlighting As Boolean, _
    fCapitalizeFirstLetters As Boolean _
) As StringCollection
'Usage
Dim instance As SearchServiceApplicationProxy
Dim properties As QueryProperties
Dim iNumberOfSuggestions As Integer
Dim fPreQuerySuggestions As Boolean
Dim fHitHighlighting As Boolean
Dim fCapitalizeFirstLetters As Boolean
Dim returnValue As StringCollection

returnValue = instance.GetQuerySuggestions(properties, _
    iNumberOfSuggestions, fPreQuerySuggestions, _
    fHitHighlighting, fCapitalizeFirstLetters)
public StringCollection GetQuerySuggestions(
    QueryProperties properties,
    int iNumberOfSuggestions,
    bool fPreQuerySuggestions,
    bool fHitHighlighting,
    bool fCapitalizeFirstLetters
)

Parameters

  • iNumberOfSuggestions
    Type: System.Int32

    The 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.

Return value

Type: System.Collections.Specialized.StringCollection
A collection of query suggestions that match the specified Search terms.

Exceptions

Exception Condition
Exception

An error, such as a SearchServiceApplicationFault, occurred during application execution.

Remarks

This method returns a collection of query suggestions that are generated based on the frequency of use.

See also

Reference

SearchServiceApplicationProxy class

SearchServiceApplicationProxy members

Microsoft.Office.Server.Search.Administration namespace