From a3918ad094cdded430c8ae7cc55eef4bfc5b14bb Mon Sep 17 00:00:00 2001 From: javanna Date: Fri, 30 Dec 2016 20:21:48 +0100 Subject: [PATCH] Remove unused ParseFieldMatcher#match method --- .../org/elasticsearch/common/ParseFieldMatcher.java | 11 ----------- .../search/suggest/SuggestionBuilder.java | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/common/ParseFieldMatcher.java b/core/src/main/java/org/elasticsearch/common/ParseFieldMatcher.java index a7d412398e5..9622a9c5909 100644 --- a/core/src/main/java/org/elasticsearch/common/ParseFieldMatcher.java +++ b/core/src/main/java/org/elasticsearch/common/ParseFieldMatcher.java @@ -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); - } } diff --git a/core/src/main/java/org/elasticsearch/search/suggest/SuggestionBuilder.java b/core/src/main/java/org/elasticsearch/search/suggest/SuggestionBuilder.java index 5f99cb43646..4f6c4d8c553 100644 --- a/core/src/main/java/org/elasticsearch/search/suggest/SuggestionBuilder.java +++ b/core/src/main/java/org/elasticsearch/search/suggest/SuggestionBuilder.java @@ -273,7 +273,7 @@ public abstract class SuggestionBuilder> 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 + "]");