elasticsearch/docs/java-api/query-dsl/not-query.asciidoc
Christoph Büscher c24b7333bd Query DSL: Deprecate NotQueryBuilder
This PR deprecates the use of NotQueryBuilder like we
did with And- and OrQueryBuilder before.
BooleanQueryBuilder is now the only way to combine several
filters together, so all uses of the not filter can be replaced
with a must_not clause.
2015-10-20 14:50:31 +02:00

17 lines
375 B
Text

[[java-query-dsl-not-query]]
==== Not Query
deprecated[2.1.0, Use `boolQuery()` with added `mustNot()` clause instead]
See {ref}/query-dsl-not-query.html[Not Query]
[source,java]
--------------------------------------------------
QueryBuilder qb = notQuery(
rangeQuery("price").from("1").to("2") <1>
);
--------------------------------------------------
<1> query