diff --git a/core/src/main/java/org/elasticsearch/index/query/SpanNearQueryParser.java b/core/src/main/java/org/elasticsearch/index/query/SpanNearQueryParser.java index 757bbb91b24..fc899ac5d1e 100644 --- a/core/src/main/java/org/elasticsearch/index/query/SpanNearQueryParser.java +++ b/core/src/main/java/org/elasticsearch/index/query/SpanNearQueryParser.java @@ -34,7 +34,7 @@ import java.util.List; public class SpanNearQueryParser implements QueryParser { public static final ParseField SLOP_FIELD = new ParseField("slop"); - public static final ParseField COLLECT_PAYLOADS_FIELD = new ParseField("collect_payloads"); + public static final ParseField COLLECT_PAYLOADS_FIELD = new ParseField("collect_payloads").withAllDeprecated("no longer supported"); public static final ParseField CLAUSES_FIELD = new ParseField("clauses"); public static final ParseField IN_ORDER_FIELD = new ParseField("in_order"); diff --git a/core/src/test/java/org/elasticsearch/index/query/SpanNearQueryBuilderTests.java b/core/src/test/java/org/elasticsearch/index/query/SpanNearQueryBuilderTests.java index c1fc9bb1b12..dc8d096f688 100644 --- a/core/src/test/java/org/elasticsearch/index/query/SpanNearQueryBuilderTests.java +++ b/core/src/test/java/org/elasticsearch/index/query/SpanNearQueryBuilderTests.java @@ -23,6 +23,7 @@ import org.apache.lucene.search.Query; import org.apache.lucene.search.spans.SpanNearQuery; import org.apache.lucene.search.spans.SpanQuery; import org.elasticsearch.Version; +import org.elasticsearch.common.ParseFieldMatcher; import java.io.IOException; import java.util.Iterator; @@ -146,6 +147,6 @@ public class SpanNearQueryBuilderTests extends AbstractQueryTestCase