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
Azure SDK for .NET
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin