SearchServiceApplication.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 SearchServiceApplication
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
properties
Type: Microsoft.Office.Server.Search.Query.QueryPropertiesThe properties of the query.
iNumberOfSuggestions
Type: System.Int32The number of suggestions to return.
fPreQuerySuggestions
Type: System.Booleantrue to return the pre-query suggestions; otherwise, false.
fHitHighlighting
Type: System.Booleantrue to highlight the returned query suggestion; otherwise, false.
fCapitalizeFirstLetters
Type: System.Booleantrue 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.
Remarks
This method returns a collection of query suggestions that are generated based on the frequency of use.
See Also
Reference
SearchServiceApplication Class