Properly deprecate the field

This commit is contained in:
Nik Everett 2016-01-12 09:55:52 -05:00
parent ae0bf1b32f
commit db3447fb03
2 changed files with 3 additions and 2 deletions

View File

@ -34,7 +34,7 @@ import java.util.List;
public class SpanNearQueryParser implements QueryParser<SpanNearQueryBuilder> {
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");

View File

@ -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<SpanNearQue
" }\n" +
"}";
parseQuery(json); // Just don't throw an error and we're fine
parseQuery(json, ParseFieldMatcher.EMPTY); // Just don't throw an error and we're fine
}
}