Compartir a través de


SearchModelFactory.FacetResult Método

Definición

Inicializa una nueva instancia de 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

Parámetros

count
Nullable<Int64>

El recuento aproximado de documentos que se encuentran dentro del cubo descrito por esta faceta.

additionalProperties
IReadOnlyDictionary<String,Object>

Propiedades adicionales.

Devoluciones

FacetResult Nueva instancia de para simular.

Ejemplos

En este ejemplo se muestra cómo simular FacetResult el tipo.

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);

Comentarios

Para más información, consulte https://docs.microsoft.com/en-us/rest/api/searchservice/search-documents#query-parameters

Se aplica a