Skip to content
New issue

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

exists: false acts like exists: true #1686

Closed
JasonBarnabe opened this issue Jul 7, 2024 · 1 comment
Closed

exists: false acts like exists: true #1686

JasonBarnabe opened this issue Jul 7, 2024 · 1 comment

Comments

@JasonBarnabe
Copy link

The README documents the query option:

store_id: {exists: true},      # exists

This seems to imply that you could do:

store_id: {exists: false},      # does not exist

However, the code seems to not care at all what value is passed; it always does an "exists" check.

It would be good to support exists: false, and/or raise an error on unexpected values for exists.

Working alternative is to use _not: { store_id: {exists: true} }.

@ankane
Copy link
Owner

ankane commented Jul 11, 2024

Hi @JasonBarnabe, thanks for reporting. Added a warning for non-true values in the commit above, and will change to an error and add support for exists: false in Searchkick 6.

@ankane ankane closed this as completed Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants