public class ScriptedMetricParser extends java.lang.Object implements Aggregator.Parser
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMBINE_SCRIPT |
static ParseField |
COMBINE_SCRIPT_FIELD |
static java.lang.String |
INIT_SCRIPT |
static ParseField |
INIT_SCRIPT_FIELD |
static ParseField |
LANG_FIELD |
static java.lang.String |
MAP_SCRIPT |
static ParseField |
MAP_SCRIPT_FIELD |
static ParseField |
PARAMS_FIELD |
static ParseField |
REDUCE_PARAMS_FIELD |
static java.lang.String |
REDUCE_SCRIPT |
static ParseField |
REDUCE_SCRIPT_FIELD |
Constructor and Description |
---|
ScriptedMetricParser() |
Modifier and Type | Method and Description |
---|---|
ScriptedMetricAggregatorBuilder |
getFactoryPrototypes() |
ScriptedMetricAggregatorBuilder |
parse(java.lang.String aggregationName,
XContentParser parser,
QueryParseContext context)
Returns the aggregator factory with which this parser is associated, may return
null indicating the
aggregation should be skipped (e.g. |
java.lang.String |
type() |
public static final java.lang.String INIT_SCRIPT
public static final java.lang.String MAP_SCRIPT
public static final java.lang.String COMBINE_SCRIPT
public static final java.lang.String REDUCE_SCRIPT
public static final ParseField INIT_SCRIPT_FIELD
public static final ParseField MAP_SCRIPT_FIELD
public static final ParseField COMBINE_SCRIPT_FIELD
public static final ParseField REDUCE_SCRIPT_FIELD
public static final ParseField PARAMS_FIELD
public static final ParseField REDUCE_PARAMS_FIELD
public static final ParseField LANG_FIELD
public java.lang.String type()
type
in interface Aggregator.Parser
public ScriptedMetricAggregatorBuilder parse(java.lang.String aggregationName, XContentParser parser, QueryParseContext context) throws java.io.IOException
Aggregator.Parser
null
indicating the
aggregation should be skipped (e.g. when trying to aggregate on unmapped fields).parse
in interface Aggregator.Parser
aggregationName
- The name of the aggregationparser
- The xcontent parsercontext
- The search contextnull
in case the aggregation should be skippedjava.io.IOException
- When parsing failspublic ScriptedMetricAggregatorBuilder getFactoryPrototypes()
getFactoryPrototypes
in interface Aggregator.Parser
AggregatorBuilder
instance for this parser
that can be used for deserialization