Remove ParseFieldMatcher usages from Aggregator

This commit is contained in:
javanna 2016-12-31 12:27:17 +01:00 committed by Luca Cavanna
parent 8b8ff8b9e2
commit ee4dde46d3
2 changed files with 2 additions and 3 deletions

View File

@ -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)) {

View File

@ -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,