Package version:

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.

interface FacetResult {
    avg?: number;
    cardinality?: number;
    count?: number;
    facets?: {
        [propertyName: string]: FacetResult[];
    };
    max?: number;
    min?: number;
    sum?: number;
    [property: string]: any;
}

Indexable

  • [property: string]: any

    Describes unknown properties. The value of an unknown property can be of "any" type.

Properties

avg?: number

The resulting total avg for the facet when a avg metric is requested. NOTE: This property will not be serialized. It can only be populated by the server.

cardinality?: number

The resulting total cardinality for the facet when a cardinality metric is requested. NOTE: This property will not be serialized. It can only be populated by the server.

count?: number

The approximate count of documents falling within the bucket described by this facet. NOTE: This property will not be serialized. It can only be populated by the server.

facets?: {
    [propertyName: string]: FacetResult[];
}

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. NOTE: This property will not be serialized. It can only be populated by the server.

max?: number

The resulting total max for the facet when a max metric is requested. NOTE: This property will not be serialized. It can only be populated by the server.

min?: number

The resulting total min for the facet when a min metric is requested. NOTE: This property will not be serialized. It can only be populated by the server.

sum?: number

The resulting total sum for the facet when a sum metric is requested. NOTE: This property will not be serialized. It can only be populated by the server.