SearchServiceApplication.HighlightStringValue method

Highlights all occurrences of the given query terms within a particular string.

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

  • fLastTermByPrefix
    Type: System.Boolean

    true if any token in strValue matches the prefix of the last token, 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

SearchServiceApplication members

Microsoft.Office.Server.Search.Administration namespace