I’d like to combine ids
query with must_not
clause. I’m using (re)tire gem with rails application.
I’m doing something like this:
query do
ids ["foo", "bar", "test"]
end
Which works. However, when I’m trying to combine it with must_not
clause, I’m getting error – must_not
works only withing boolean
scope, which does not include ids
query. Is there any way to combine that two queries?
The ES query that you need to use is this one:
So, you need boolean scope, a
must
with yourids
and amust_not
with your must not match queries.