From db3447fb031f94164e4eb47b505d7187141fefc2 Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Tue, 12 Jan 2016 09:55:52 -0500 Subject: [PATCH] Properly deprecate the field --- .../org/elasticsearch/index/query/SpanNearQueryParser.java | 2 +- .../elasticsearch/index/query/SpanNearQueryBuilderTests.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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