-
-
Notifications
You must be signed in to change notification settings - Fork 128
Open
Labels
Description
bodybuilder()
.query('term', 'field', 'something')
.andQuery('bool', (q) => {
return q.query('term', 'obj1.color', 'blue')
})
.build()
generates bool.query which is not valid as per ES
[bool] query does not support [query]
{
"query": {
"bool": {
"must": [
{
"term": {
"field": "something"
}
},
{
"bool": {
"query": {
"term": {
"obj1.color": "blue"
}
}
}
}
]
}
}
}
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 ?