Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TopAggregator<K, V, E>

TopAggregator aggregates the top N extracted values into an array. The extracted values must not be null, but do not need to be unique.

Type parameters

  • K = any

    the type of the Map entry keys

  • V = any

    the type of the Map entry values

  • E = any

    the extracted type

Hierarchy

Index

Constructors

constructor

Properties

Protected @class

@class: string

Server-side EntryAggregator implementation type identifier.

Protected Optional comparator

comparator: AggregatorComparator

The Comparator to apply against the extracted values.

Protected extractor

extractor: IdentityExtractor = Extractors.identity()

The extractor to obtain the values to aggregate. If not explicitly set, this will default to an IdentityExtractor.

Protected inverse

inverse: boolean = false

Result order. By default, results will be ordered in descending order.

Protected Optional property

property: string

Protected results

results: number = 0

The maximum number of results to include in the aggregation result.

Methods

andThen

ascending

  • Sort the returned values in ascending order.

    Returns TopAggregator<K, V>

descending

  • Sort the returned values in descending order.

    Returns TopAggregator<K, V>

extract

  • The property name of the value to extract.

    Parameters

    • property: string

      the property name

    Returns TopAggregator<K, V>

orderBy

  • Order the results based on the values of the specified property.

    Parameters

    • property: string

      the property name

    Returns TopAggregator<K, V>