Reputation: 189
For MarkLogic Query-By-Example, I can search for all entries that contains the specific email address like this:
{
"$query":
{
"emailAddress":"[email protected]"
}
}
My question is how can you negate this search, for this specific example, how can I find all the results that does NOT contain emailAddress with value: '[email protected]' ? Is there a not operator for MarkLogic Query By Example JSON format?
Upvotes: 0
Views: 161
Reputation: 7840
Try $not
or $nor
: https://docs.marklogic.com/guide/search-dev/qbe mentions $nor
, but looking at qbe-model.xqy
I think that's a typo and it should be $not
.
There's also a $ne
for range query, in case that helps.
Upvotes: 2