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() |
configurepublic 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)
AggregationStrategy instance that handles this aggregation.getStrategy in class Aggregationconfig - The BulletConfig containing configuration for the strategy.public List<String> getFields()
AggregationgetFields in class Aggregationpublic String toString()
toString in class AggregationCopyright © 2021. All rights reserved.