elastic / elastic/elasticsearch-dsl-ruby
[DSL] handle multiple values (array)
- Dominant language
- Ruby
- Stars
- 18
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Is my understanding correct that if i want to do
```
{
"query": {
"bool": {
"must": [
{
"term": {"shape": "round"}
},
{
"bool": {
"should": [
{"term": {"color": "red"}},
{"term": {"color": "blue"}}
]
}
}
]
}
}
}
```
I would have to write:
```
query do
bool do
must do
term shape: round
end
must do
bool do
should do
term color: red
end
should do
term color: blue
end
end
end
end
end
```
(notice the multiple must/should blocks)
i didn't receive any error message when putting multiple terms into one must block - it just swallowed the further ones
did i do something wrong? am i misunderstanding something? is there a way to do "array-like" syntax that i am unaware off?
If this is by design - are there any other differences to the JSON syntax i should be aware off?
Contributor guide
Assessment
This issue has not been assessed yet.