You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the query builder doesn't support certain queries due to the inability to create a nested SearchBuilder. I understand there is a nested type which isn't the same and is handled differently in ElasticSearch being a nested document.
The following SQL is just not possible to create with the query build but is supported by ElasticSearch.
WHERE (
type ='student'AND (
school ='abc'OR school ='bcd'
)
)
WHERE (
type ='student'OR school ='abc'OR school ='bcd'
)
As you can see these are very different queries and from what I can see there is no way (especially in the docs) to create the first query.
We were able to get around this limitation using a macro. I'm adding this as an issue here if you would like to address it in the core as I'm sure other people have run into the same issue.
Currently, the query builder doesn't support certain queries due to the inability to create a nested SearchBuilder. I understand there is a nested type which isn't the same and is handled differently in ElasticSearch being a nested document.
The following SQL is just not possible to create with the query build but is supported by ElasticSearch.
Query Builder Syntax:
Expected DSL: https://pastebin.com/gUpgXzkw
Actual DSL: https://pastebin.com/ZPgfuDKw
This results in the following SQL:
As you can see these are very different queries and from what I can see there is no way (especially in the docs) to create the first query.
We were able to get around this limitation using a macro. I'm adding this as an issue here if you would like to address it in the core as I'm sure other people have run into the same issue.
Macro Code: https://pastebin.com/8gtsQHHr
Query Builder Syntax With Macro
The text was updated successfully, but these errors were encountered: