diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/FuzzyLikeThisQueryParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/FuzzyLikeThisQueryParser.java index ef6a16af3e2..b15eea34673 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/FuzzyLikeThisQueryParser.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/FuzzyLikeThisQueryParser.java @@ -115,10 +115,6 @@ public class FuzzyLikeThisQueryParser extends AbstractIndexComponent implements query.setBoost(boost); query.setIgnoreTF(ignoreTF); - // move to the next end object, to close the field name - token = parser.nextToken(); - assert token == XContentParser.Token.END_OBJECT; - return query; } } \ No newline at end of file diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/MoreLikeThisQueryParser.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/MoreLikeThisQueryParser.java index 7a7239e6b4d..74443dafdda 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/MoreLikeThisQueryParser.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/query/xcontent/MoreLikeThisQueryParser.java @@ -107,10 +107,6 @@ public class MoreLikeThisQueryParser extends AbstractIndexComponent implements X throw new QueryParsingException(index, "more_like_this requires 'fields' to be specified"); } - // move to the next end object, to close the field name - token = parser.nextToken(); - assert token == XContentParser.Token.END_OBJECT; - mltQuery.setAnalyzer(parseContext.mapperService().searchAnalyzer()); return mltQuery; }