We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arranger 2.x build the same ES query for a __missing__ variable whatever the operator is in or some-not-in
__missing__
in
some-not-in
"content": { "field": "foo", "index": "index", "value": [ "__missing__" ] }, "op": "some-not-in"
"bool": { "must": [ { "exists": { "field": "foo", "boost": 0 } } ] }
"bool": { "must_not": [ { "exists": { "field": "foo", "boost": 0 } } ] }
middleware/dist/buildQuery/index.js
The isNot param should be true only if we want the field to be missing like this:
isNot
true
isNot: op === IN_OP,
query MyQuery( $sqon: JSON $first: Int $offset: Int $sort: [Sort] ) { Index { hits(filters: $sqon, first: $first, offset: $offset, sort: $sort) { total edges { node { id foo } } } }
{ "first": 20, "offset": 0, "sqon": { "content": [ { "content": { "field": "foo", "index": "index", "value": [ "__missing__" ] }, "op": "some-not-in" } ] }, "sort": [ ] }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
Arranger 2.x build the same ES query for a
__missing__
variable whatever the operator isin
orsome-not-in
Expected Behaviour
"content": { "field": "foo", "index": "index", "value": [ "__missing__" ] }, "op": "some-not-in"
Actual Behaviour
Possible Fix
middleware/dist/buildQuery/index.js
The
isNot
param should betrue
only if we want the field to be missing like this:isNot: op === IN_OP,
Steps to Reproduce
Your Environment
The text was updated successfully, but these errors were encountered: