mustNotDsl
Adds queries to the must_not occurrence.
Documents must not match any queries in this occurrence. These queries do not affect scoring and are executed in filter context.
Example
val document = Metamodels.product
BoolQuery.of {
it.boolQueryDsl {
mustNotDsl {
document.category term "discontinued"
document.status term Status.DELETED
}
}
}Content copied to clipboard
See also
for available query types