From de71a1ce996d36fd6dad1703f3dc4510f77c7657 Mon Sep 17 00:00:00 2001 From: kimchy Date: Wed, 18 Aug 2010 14:36:34 +0300 Subject: [PATCH] filtered more_like_this doesn't parse correctly, closes #326. --- .../index/query/xcontent/FuzzyLikeThisQueryParser.java | 4 ---- .../index/query/xcontent/MoreLikeThisQueryParser.java | 4 ---- 2 files changed, 8 deletions(-) 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; }