Query.HighlightStringValue method

Highlights all the occurrences of the specified query terms in a string.

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

public string HighlightStringValue(
	string strValue,
	bool fLastTermByPrefix,
	bool fQuerySuggestions,
	out bool fHasHighLight
)

Parameters

strValue
Type: System.String

The string to highlight the query terms in.

fLastTermByPrefix
Type: System.Boolean

Specifies whether the last query term must match by prefix. true if any term in the strValue element that matches the prefix of the last term in the query should be highlighted; otherwise false, if all terms in the strValue element should be highlighted only if they match the query terms exactly.

fQuerySuggestions
Type: System.Boolean

Specifies the string is a query suggestion. true if the string is a query suggestion; otherwise false.

fHasHighLight
Type: System.Boolean

Specifies whether the string contains any highlighted terms.

Return value

Type: System.String
The string with the specified terms highlighted.
Show: