SearchServiceApplication.HighlightStringValue Method
Highlights all the occurrences of the specified query terms in a specified string value.
Namespace: Microsoft.Office.Server.Search.Administration
Assembly: Microsoft.Office.Server.Search (in Microsoft.Office.Server.Search.dll)
Syntax
'Declaration
Public Function HighlightStringValue ( _
properties As QueryProperties, _
strValue As String, _
fLastTermByPrefix As Boolean _
) As HighlightedString
'Usage
Dim instance As SearchServiceApplication
Dim properties As QueryProperties
Dim strValue As String
Dim fLastTermByPrefix As Boolean
Dim returnValue As HighlightedString
returnValue = instance.HighlightStringValue(properties, _
strValue, fLastTermByPrefix)
public HighlightedString HighlightStringValue(
QueryProperties properties,
string strValue,
bool fLastTermByPrefix
)
Parameters
properties
Type: Microsoft.Office.Server.Search.Query.QueryPropertiesThe properties of a Search query.
strValue
Type: System.StringThe value of the string to be highlighted.
fLastTermByPrefix
Type: System.Booleantrue if any token in the strValue element that matches the prefix of the last token in the query will be highlighted; otherwise, false.
Return Value
Type: Microsoft.Office.Server.Search.Query.HighlightedString
The string in which all the occurrences of the specified query terms are highlighted.
Remarks
This method highlights all of the occurrences of the specified query terms by enclosing each term in open (<b>) and close (</b>) tags.
See Also
Reference
SearchServiceApplication Class