Query.HighlightStringValue 方法

突出显示字符串中指定的查询条件的所有匹配的项。

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

语法

声明
Public Function HighlightStringValue ( _
    strValue As String, _
    fLastTermByPrefix As Boolean, _
    fQuerySuggestions As Boolean, _
    <OutAttribute> ByRef fHasHighLight As Boolean _
) As String
用法
Dim instance As Query
Dim strValue As String
Dim fLastTermByPrefix As Boolean
Dim fQuerySuggestions As Boolean
Dim fHasHighLight As Boolean
Dim returnValue As String

returnValue = instance.HighlightStringValue(strValue, _
    fLastTermByPrefix, fQuerySuggestions, _
    fHasHighLight)
public string HighlightStringValue(
    string strValue,
    bool fLastTermByPrefix,
    bool fQuerySuggestions,
    out bool fHasHighLight
)

参数

  • strValue
    类型:System.String

    要突出显示的查询词中的字符串。

  • fLastTermByPrefix
    类型:System.Boolean

    指定是否必须与最后一个查询词匹配的前缀。true如果匹配查询中最后一个词的前缀strValue元素中的任何条款应突出显示 ;否则为false,如果应突出显示strValue元素中的所有条款,只有当它们完全匹配查询词。

  • fQuerySuggestions
    类型:System.Boolean

    指定的字符串是查询建议。true如果字符串查询建议 ;否则为false。

  • fHasHighLight
    类型:System.Boolean

    指定的字符串是否包含任何突出显示的术语。

返回值

类型:System.String
指定条件突出显示该字符串。

另请参阅

引用

Query 类

Query 成员

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