Skip to content

Commit

Permalink
Remove unused ParseFieldMatcher#match method
Browse files Browse the repository at this point in the history
  • Loading branch information
javanna committed Dec 31, 2016
1 parent cd6b569 commit a3918ad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
11 changes: 0 additions & 11 deletions core/src/main/java/org/elasticsearch/common/ParseFieldMatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static SuggestionBuilder<?> fromXContent(QueryParseContext parseContext, Suggest
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 + "]");
Expand Down

0 comments on commit a3918ad

Please sign in to comment.