Skip to content

Love and Hate Query

Edit page

The + and - operators, select documents based on the presence or absence of specified terms.

A lone exclusion, such as -ambitious with nothing required, is not a query: under _and or _or on a field with no stop word list it answers 400 (“Syntax: NOT ”).

The following matches all documents with the phrase “adventurous nature” but not ambitious; and:

SEARCH /bank/
{
"_query": {
"personality": "\"adventurous nature\" -ambitious"
}
}