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

Options are not supported in filters that get translated into the must_not part of Elastic queries #20

Open
robvandenbogaard opened this issue Apr 5, 2024 · 0 comments
Assignees

Comments

@robvandenbogaard
Copy link

Building Elastic queries via the build_filter function in elasticsearch_search.erl:169 is done in two parts: one part handles filters that include things, resulting in a must subquery of the top-level boolean query, and the other part handles exclusion (e.g. ne or <> operations).
It turns out that the latter does not support filter options, as the must part does (because it is implemented separately, and it does not use map_filter, where options are processed).
This is troublesome for nested fields that require a path option to be set.
Also, only the atom <> and ne are supported in must_nots, while the must path supports also binary and list (string) operators. This is suspected to introduce unexpected behaviour (or absence of) when using normal quotes.

@robvandenbogaard robvandenbogaard self-assigned this Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant