GetQuerySuggestions method
TOC
Collapse the table of content
Expand the table of content

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)

public StringCollection GetQuerySuggestions(
	QueryProperties properties,
	int iNumberOfSuggestions,
	bool fPreQuerySuggestions,
	bool fHitHighlighting,
	bool fCapitalizeFirstLetters
)

Parameters

properties
Type: Microsoft.Office.Server.Search.Query.QueryProperties

The properties of the query.

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.

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

Show:
© 2016 Microsoft