Remove ParseFieldMatcher usages from Aggregator
This commit is contained in:
parent
8b8ff8b9e2
commit
ee4dde46d3
|
@ -21,7 +21,6 @@ package org.elasticsearch.search.aggregations;
|
|||
|
||||
import org.elasticsearch.ElasticsearchParseException;
|
||||
import org.elasticsearch.common.ParseField;
|
||||
import org.elasticsearch.common.ParseFieldMatcher;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
import org.elasticsearch.common.io.stream.StreamOutput;
|
||||
import org.elasticsearch.common.io.stream.Writeable;
|
||||
|
@ -129,7 +128,7 @@ public abstract class Aggregator extends BucketCollector implements Releasable {
|
|||
return parseField;
|
||||
}
|
||||
|
||||
public static SubAggCollectionMode parse(String value, ParseFieldMatcher parseFieldMatcher) {
|
||||
public static SubAggCollectionMode parse(String value) {
|
||||
SubAggCollectionMode[] modes = SubAggCollectionMode.values();
|
||||
for (SubAggCollectionMode mode : modes) {
|
||||
if (mode.parseField.match(value)) {
|
||||
|
|
|
@ -82,7 +82,7 @@ public class TermsAggregationBuilder extends ValuesSourceAggregationBuilder<Valu
|
|||
PARSER.declareString(TermsAggregationBuilder::executionHint, EXECUTION_HINT_FIELD_NAME);
|
||||
|
||||
PARSER.declareField(TermsAggregationBuilder::collectMode,
|
||||
(p, c) -> SubAggCollectionMode.parse(p.text(), c.getParseFieldMatcher()),
|
||||
(p, c) -> SubAggCollectionMode.parse(p.text()),
|
||||
SubAggCollectionMode.KEY, ObjectParser.ValueType.STRING);
|
||||
|
||||
PARSER.declareObjectArray(TermsAggregationBuilder::order, TermsAggregationBuilder::parseOrderParam,
|
||||
|
|
Loading…
Reference in New Issue