-
-
Notifications
You must be signed in to change notification settings - Fork 128
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
Nested Sub-query does not generate correct elastic search syntax. #266
Comments
@vinay11283 I'm not sure what you're trying to query for, but can't you just do
|
@danpaz Thanks for your response. Sorry, I should have come up with a better example. I thought I would reporduce with a simple example but that was not a good choice. Scenario: transactionId OR (firstName AND lastName) where firstName and lastName are nested fields in path Here is how I construct it.
Now as soon as I include another non-nested field, in the sub query it generates it fine.
|
That's a known-issue. You can't have a single level nesting. If you think about it, it's redundant. It can be brought up a level. |
@johannes-scharlach Using filter instead of query will work, but filter and query have a different behavior regarding scoring (https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-filter-context.html). |
generates bool.query which is not valid as per ES
[bool] query does not support [query]
This is just simplistic scneario, I genuinely have some subqueries wiith nested path's as well which does not work. I can come up with better example if this does not make sense.
Please advise if there is a workaround I can apply ?
The text was updated successfully, but these errors were encountered: