Remove unused ParseFieldMatcher#match method

This commit is contained in:
javanna 2016-12-30 20:21:48 +01:00 committed by Luca Cavanna
parent cd6b569286
commit a3918ad094
2 changed files with 1 additions and 12 deletions

View File

@ -36,15 +36,4 @@ public class ParseFieldMatcher {
public ParseFieldMatcher(Settings settings) {
//we don't do anything with the settings argument, this whole class will be soon removed
}
/**
* Matches a {@link ParseField} against a field name,
* @param fieldName the field name found in the request while parsing
* @param parseField the parse field that we are looking for
* @throws IllegalArgumentException whenever we are in strict mode and the request contained a deprecated field
* @return true whenever the parse field that we are looking for was found, false otherwise
*/
public boolean match(String fieldName, ParseField parseField) {
return parseField.match(fieldName);
}
}

View File

@ -273,7 +273,7 @@ public abstract class SuggestionBuilder<T extends SuggestionBuilder<T>> implemen
suggestText = parser.text();
} else if (PREFIX_FIELD.match(currentFieldName)) {
prefix = parser.text();
} else if (PREFIX_FIELD.match(currentFieldName)) {
} else if (REGEX_FIELD.match(currentFieldName)) {
regex = parser.text();
} else {
throw new ParsingException(parser.getTokenLocation(), "suggestion does not support [" + currentFieldName + "]");