public class TopK extends Aggregation
size, type
Constructor and Description |
---|
TopK(Map<String,String> fieldsToNames,
Integer size,
Long threshold,
String name)
Constructor that creates a TOP_K aggregation with a specified max size.
|
Modifier and Type | Method and Description |
---|---|
List<String> |
getFields()
Gets the aggregation fields.
|
Strategy |
getStrategy(BulletConfig config)
Returns a new
Strategy instance that handles this aggregation. |
String |
toString() |
configure
public TopK(Map<String,String> fieldsToNames, Integer size, Long threshold, String name)
fieldsToNames
- The mapping of fields to aliases of the Top K aggregation. Must not be empty.size
- The max size of the Top K aggregation. Can be null.threshold
- The minimum threshold of the Top K aggregation. Can be null.name
- The name of the count field.public Strategy getStrategy(BulletConfig config)
Aggregation
Strategy
instance that handles this aggregation.getStrategy
in class Aggregation
config
- The BulletConfig
containing configuration for the strategy.public List<String> getFields()
Aggregation
getFields
in class Aggregation
public String toString()
toString
in class Aggregation
Copyright © 2021. All rights reserved.