public abstract class AbstractTermsParser extends AbstractValuesSourceParser.AnyValuesSourceParser
AbstractValuesSourceParser.AnyValuesSourceParser, AbstractValuesSourceParser.BytesValuesSourceParser, AbstractValuesSourceParser.GeoPointValuesSourceParser, AbstractValuesSourceParser.NumericValuesSourceParser
Modifier and Type | Field and Description |
---|---|
static ParseField |
EXECUTION_HINT_FIELD_NAME |
IncludeExclude.Parser |
incExcParser |
static ParseField |
MIN_DOC_COUNT_FIELD_NAME |
static ParseField |
REQUIRED_SIZE_FIELD_NAME |
static ParseField |
SHARD_MIN_DOC_COUNT_FIELD_NAME |
static ParseField |
SHARD_SIZE_FIELD_NAME |
Modifier | Constructor and Description |
---|---|
protected |
AbstractTermsParser() |
Modifier and Type | Method and Description |
---|---|
protected ValuesSourceAggregatorBuilder<ValuesSource,?> |
createFactory(java.lang.String aggregationName,
ValuesSourceType valuesSourceType,
ValueType targetValueType,
java.util.Map<ParseField,java.lang.Object> otherOptions)
Creates a
ValuesSourceAggregatorBuilder from the information
gathered by the subclass. |
protected abstract ValuesSourceAggregatorBuilder<ValuesSource,?> |
doCreateFactory(java.lang.String aggregationName,
ValuesSourceType valuesSourceType,
ValueType targetValueType,
TermsAggregator.BucketCountThresholds bucketCountThresholds,
Aggregator.SubAggCollectionMode collectMode,
java.lang.String executionHint,
IncludeExclude incExc,
java.util.Map<ParseField,java.lang.Object> otherOptions) |
protected abstract TermsAggregator.BucketCountThresholds |
getDefaultBucketCountThresholds() |
abstract boolean |
parseSpecial(java.lang.String aggregationName,
XContentParser parser,
ParseFieldMatcher parseFieldMatcher,
XContentParser.Token token,
java.lang.String currentFieldName,
java.util.Map<ParseField,java.lang.Object> otherOptions) |
protected boolean |
token(java.lang.String aggregationName,
java.lang.String currentFieldName,
XContentParser.Token token,
XContentParser parser,
ParseFieldMatcher parseFieldMatcher,
java.util.Map<ParseField,java.lang.Object> otherOptions)
Allows subclasses of
AbstractValuesSourceParser to parse extra
parameters and store them in a Map which will later be passed to
AbstractValuesSourceParser.createFactory(String, ValuesSourceType, ValueType, Map) . |
parse
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFactoryPrototypes, type
public static final ParseField EXECUTION_HINT_FIELD_NAME
public static final ParseField SHARD_SIZE_FIELD_NAME
public static final ParseField MIN_DOC_COUNT_FIELD_NAME
public static final ParseField SHARD_MIN_DOC_COUNT_FIELD_NAME
public static final ParseField REQUIRED_SIZE_FIELD_NAME
public IncludeExclude.Parser incExcParser
protected final ValuesSourceAggregatorBuilder<ValuesSource,?> createFactory(java.lang.String aggregationName, ValuesSourceType valuesSourceType, ValueType targetValueType, java.util.Map<ParseField,java.lang.Object> otherOptions)
AbstractValuesSourceParser
ValuesSourceAggregatorBuilder
from the information
gathered by the subclass. Options parsed in
AbstractValuesSourceParser
itself will be added to the factory
after it has been returned by this method.createFactory
in class AbstractValuesSourceParser<ValuesSource>
aggregationName
- the name of the aggregationvaluesSourceType
- the type of the ValuesSource
targetValueType
- the target type of the final value output by the aggregationotherOptions
- a Map
containing the extra options parsed by the
AbstractValuesSourceParser.token(String, String, org.elasticsearch.common.xcontent.XContentParser.Token,
XContentParser, ParseFieldMatcher, Map)
methodprotected abstract ValuesSourceAggregatorBuilder<ValuesSource,?> doCreateFactory(java.lang.String aggregationName, ValuesSourceType valuesSourceType, ValueType targetValueType, TermsAggregator.BucketCountThresholds bucketCountThresholds, Aggregator.SubAggCollectionMode collectMode, java.lang.String executionHint, IncludeExclude incExc, java.util.Map<ParseField,java.lang.Object> otherOptions)
protected boolean token(java.lang.String aggregationName, java.lang.String currentFieldName, XContentParser.Token token, XContentParser parser, ParseFieldMatcher parseFieldMatcher, java.util.Map<ParseField,java.lang.Object> otherOptions) throws java.io.IOException
AbstractValuesSourceParser
AbstractValuesSourceParser
to parse extra
parameters and store them in a Map
which will later be passed to
AbstractValuesSourceParser.createFactory(String, ValuesSourceType, ValueType, Map)
.token
in class AbstractValuesSourceParser<ValuesSource>
aggregationName
- the name of the aggregationcurrentFieldName
- the name of the current field being parsedtoken
- the current token for the parserparser
- the parserparseFieldMatcher
- the ParseFieldMatcher
to use to match field namesotherOptions
- a Map
of options to be populated by successive calls
to this method which will then be passed to the
AbstractValuesSourceParser.createFactory(String, ValuesSourceType, ValueType, Map)
methodtrue
if the current token was correctly parsed,
false
otherwisejava.io.IOException
- if an error occurs whilst parsingpublic abstract boolean parseSpecial(java.lang.String aggregationName, XContentParser parser, ParseFieldMatcher parseFieldMatcher, XContentParser.Token token, java.lang.String currentFieldName, java.util.Map<ParseField,java.lang.Object> otherOptions) throws java.io.IOException
java.io.IOException
protected abstract TermsAggregator.BucketCountThresholds getDefaultBucketCountThresholds()