Class FacetResult
java.lang.Object
com.azure.search.documents.models.FacetResult
- All Implemented Interfaces:
com.azure.json.JsonSerializable<FacetResult>
public final class FacetResult
extends Object
implements com.azure.json.JsonSerializable<FacetResult>
A single bucket of a facet query result. Reports the number of documents with a field value falling within a
particular range or having a particular value or interval.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FacetResultfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of FacetResult from the JsonReader.Get the additionalProperties property: A single bucket of a facet query result.getCount()Get the count property: The approximate count of documents falling within the bucket described by this facet.Get the facets property: The nested facet query results for the search operation, organized as a collection of buckets for each faceted field; null if the query did not contain any nested facets.getSum()Get the sum property: The resulting total sum for the facet when a sum metric is requested.setAdditionalProperties(Map<String, Object> additionalProperties) Set the additionalProperties property: A single bucket of a facet query result.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
FacetResult
public FacetResult()Creates an instance of FacetResult class.
-
-
Method Details
-
getCount
Get the count property: The approximate count of documents falling within the bucket described by this facet.- Returns:
- the count value.
-
getSum
Get the sum property: The resulting total sum for the facet when a sum metric is requested.- Returns:
- the sum value.
-
getFacets
Get the facets property: The nested facet query results for the search operation, organized as a collection of buckets for each faceted field; null if the query did not contain any nested facets.- Returns:
- the facets value.
-
getAdditionalProperties
Get the additionalProperties property: A single bucket of a facet query result. Reports the number of documents with a field value falling within a particular range or having a particular value or interval.- Returns:
- the additionalProperties value.
-
setAdditionalProperties
Set the additionalProperties property: A single bucket of a facet query result. Reports the number of documents with a field value falling within a particular range or having a particular value or interval.- Parameters:
additionalProperties- the additionalProperties value to set.- Returns:
- the FacetResult object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<FacetResult>- Throws:
IOException
-
fromJson
Reads an instance of FacetResult from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of FacetResult if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the FacetResult.
-