SearchModelFactory.FacetResult Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of FacetResult.
public static Azure.Search.Documents.Models.FacetResult FacetResult (long? count = default, System.Collections.Generic.IReadOnlyDictionary<string,object> additionalProperties = default);
static member FacetResult : Nullable<int64> * System.Collections.Generic.IReadOnlyDictionary<string, obj> -> Azure.Search.Documents.Models.FacetResult
Public Shared Function FacetResult (Optional count As Nullable(Of Long) = Nothing, Optional additionalProperties As IReadOnlyDictionary(Of String, Object) = Nothing) As FacetResult
Parameters
The approximate count of documents falling within the bucket described by this facet.
- additionalProperties
- IReadOnlyDictionary<String,Object>
Additional Properties.
Returns
A new FacetResult instance for mocking.
Examples
This sample shows how to mock FacetResult type.
var count = 2;
var additionalProperties = new Dictionary<string, object>()
{
["value"] = "Luxury"
}
var facetResult = SearchModelFactory.FacetResult(count, additionalProperties);
Assert.AreEqual(count, facetResult.Count);
var additionalProperty = additionalProperties.First();
Assert.AreEqual(additionalProperty.Value, facetResult.TryGetValue(additionalProperty.Key, out object value) ? value : null);
Remarks
For more details please refer https://docs.microsoft.com/en-us/rest/api/searchservice/search-documents#query-parameters
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應