Query.GetQuerySuggestions method
Returns a list of query suggestions matching the search terms typed in the search box.
Namespace: Microsoft.Office.Server.Search.Query
Assembly: Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)
Syntax
'Declaration
Public Function GetQuerySuggestions ( _
iNumberOfSuggestions As Integer, _
fPreQuerySuggestions As Boolean, _
fHitHighlighting As Boolean, _
fCapitalizeFirstLetters As Boolean _
) As StringCollection
'Usage
Dim instance As Query
Dim iNumberOfSuggestions As Integer
Dim fPreQuerySuggestions As Boolean
Dim fHitHighlighting As Boolean
Dim fCapitalizeFirstLetters As Boolean
Dim returnValue As StringCollection
returnValue = instance.GetQuerySuggestions(iNumberOfSuggestions, _
fPreQuerySuggestions, fHitHighlighting, _
fCapitalizeFirstLetters)
public StringCollection GetQuerySuggestions(
int iNumberOfSuggestions,
bool fPreQuerySuggestions,
bool fHitHighlighting,
bool fCapitalizeFirstLetters
)
Parameters
iNumberOfSuggestions
Type: System.Int32Specifies the number of suggestions to return.
fPreQuerySuggestions
Type: System.BooleanSpecifies whether pre query suggestions should be returned.
fHitHighlighting
Type: System.BooleanSpecifies whether parts of the query suggestion returned should be hit-highlighted.
fCapitalizeFirstLetters
Type: System.BooleanSpecifies whether the first letter in the query suggestion should be capitalized.
Return value
Type: System.Collections.Specialized.StringCollection
The list of query suggestions.
Remarks
Query suggestions are generated based upon the frequency of usage. The most frequently used search terms are returned.