public class ScriptedMetricParser extends Objectimplements Aggregator .Parser
| Modifier and Type | Field and Description |
|---|---|
static String |
COMBINE_SCRIPT
|
static String |
INIT_SCRIPT
|
static ParseField |
LANG_FIELD
|
static String |
MAP_SCRIPT
|
static ParseField |
PARAMS_FIELD
|
static ParseField |
REDUCE_PARAMS_FIELD
|
static String |
REDUCE_SCRIPT
|
| Constructor and Description |
|---|
ScriptedMetricParser()
|
| Modifier and Type | Method and Description |
|---|---|
AggregatorFactory |
parse(String
Returns the aggregator factory with which this parser is associated, may return
null indicating the aggregation should be skipped (e.g.
|
String |
type()
|
public static final StringINIT_SCRIPT
public static final StringMAP_SCRIPT
public static final StringCOMBINE_SCRIPT
public static final StringREDUCE_SCRIPT
public static final ParseFieldPARAMS_FIELD
public static final ParseFieldREDUCE_PARAMS_FIELD
public static final ParseFieldLANG_FIELD
public Stringtype()
type in interface
Aggregator.Parser
public AggregatorFactoryparse(String aggregationName, XContentParser parser, SearchContext context) throws 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 aggregation
parser - The xcontent parser
context - The search context
null in case the aggregation should be skipped
IOException - When parsing fails