Query.GetQuerySuggestionsWithResults 方法
傳回符合在 [搜尋] 方塊中輸入搜尋字詞的查詢建議的清單。
命名空間: Microsoft.SharePoint.Client.Search.Query
組件: Microsoft.SharePoint.Client.Search (在 Microsoft.SharePoint.Client.Search.dll 中)
語法
'宣告
Public Function GetQuerySuggestionsWithResults ( _
iNumberOfQuerySuggestions As Integer, _
iNumberOfResultSuggestions As Integer, _
fPreQuerySuggestions As Boolean, _
fHitHighlighting As Boolean, _
fCapitalizeFirstLetters As Boolean, _
fPrefixMatchAllTerms As Boolean _
) As ClientResult(Of QuerySuggestionResults)
'用途
Dim instance As Query
Dim iNumberOfQuerySuggestions As Integer
Dim iNumberOfResultSuggestions As Integer
Dim fPreQuerySuggestions As Boolean
Dim fHitHighlighting As Boolean
Dim fCapitalizeFirstLetters As Boolean
Dim fPrefixMatchAllTerms As Boolean
Dim returnValue As ClientResult(Of QuerySuggestionResults)
returnValue = instance.GetQuerySuggestionsWithResults(iNumberOfQuerySuggestions, _
iNumberOfResultSuggestions, fPreQuerySuggestions, _
fHitHighlighting, fCapitalizeFirstLetters, _
fPrefixMatchAllTerms)
public ClientResult<QuerySuggestionResults> GetQuerySuggestionsWithResults(
int iNumberOfQuerySuggestions,
int iNumberOfResultSuggestions,
bool fPreQuerySuggestions,
bool fHitHighlighting,
bool fCapitalizeFirstLetters,
bool fPrefixMatchAllTerms
)
參數
iNumberOfQuerySuggestions
類型:System.Int32指定使用者想要收到的查詢建議數目。
iNumberOfResultSuggestions
類型:System.Int32指定要傳回的建議數目上限。
fPreQuerySuggestions
類型:System.Boolean指定是否應傳回測試查詢建議。
fHitHighlighting
類型:System.Boolean指定是否傳回的查詢建議的部分應點擊醒目提示。
fCapitalizeFirstLetters
類型:System.Boolean指定是否必須大寫的查詢建議的第一個字母。
fPrefixMatchAllTerms
類型:System.Boolean指定建議是否傳回應該前置詞與相符的查詢文字。
傳回值
類型:Microsoft.SharePoint.Client.ClientResult<QuerySuggestionResults>
查詢建議的清單。