public static class ScriptedMetricAggregator.Factory extends AggregatorFactory
factories, name, parent, type
Constructor and Description |
---|
Factory(String name,
String scriptLang,
ScriptService.ScriptType initScriptType,
String initScript,
ScriptService.ScriptType mapScriptType,
String mapScript,
ScriptService.ScriptType combineScriptType,
String combineScript,
ScriptService.ScriptType reduceScriptType,
String reduceScript,
Map<String,Object> params,
Map<String,Object> reduceParams) |
Modifier and Type | Method and Description |
---|---|
Aggregator |
create(AggregationContext context,
Aggregator parent,
long expectedBucketsCount)
Creates the aggregator
|
doValidate, parent, subFactories, validate
public Factory(String name, String scriptLang, ScriptService.ScriptType initScriptType, String initScript, ScriptService.ScriptType mapScriptType, String mapScript, ScriptService.ScriptType combineScriptType, String combineScript, ScriptService.ScriptType reduceScriptType, String reduceScript, Map<String,Object> params, Map<String,Object> reduceParams)
public Aggregator create(AggregationContext context, Aggregator parent, long expectedBucketsCount)
AggregatorFactory
create
in class AggregatorFactory
context
- The aggregation contextparent
- The parent aggregator (if this is a top level factory, the parent will be null
)expectedBucketsCount
- If this is a sub-factory of another factory, this will indicate the number of bucket the parent aggregator
may generate (this is an estimation only). For top level factories, this will always be 0Copyright © 2009–2015. All rights reserved.