SearchServiceApplication.HighlightStringValue 方法

突出显示给定的查询词中特定字符串的所有匹配项。

命名空间:  Microsoft.Office.Server.Search.Administration
程序集:  Microsoft.Office.Server.Search(位于 Microsoft.Office.Server.Search.dll 中)

语法

声明
Public Function HighlightStringValue ( _
    properties As QueryProperties, _
    strValue As String, _
    fLastTermByPrefix As Boolean _
) As HighlightedString
用法
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
)

参数

  • fLastTermByPrefix
    类型:System.Boolean

    true如果在strValue中的任何标记匹配的最后一个令牌,查询的前缀将突出显示 ;否则为false。

返回值

类型:Microsoft.Office.Server.Search.Query.HighlightedString
字符串中的所有匹配项的指定查询条件的突出显示。

备注

此方法突出显示所有指定的查询词的匹配项的每个术语括在打开 (< b >) 和关闭 (< /b >) 标记中。

另请参阅

引用

SearchServiceApplication 类

SearchServiceApplication 成员

Microsoft.Office.Server.Search.Administration 命名空间