I'm trying to figure out how to do the equivalent of a SQL IN clause with ElasticSearch.
The query below will work but when I change it to "query": ["1589", "1590"] it does not. I believe it's doing an AND on these 2 values for the same field and I would like it to do an OR or an WHERE IN.
Works
{
"size": 10,
"query": {
"bool": {
"must": [
{
"match": {
"userId": {
"query": ["1589"]
}
}
}
]
}
}
}
Fails
{
"size": 10,
"query": {
"bool": {
"must": [
{
"match": {
"userId": {
"query": ["1589", "1590"]
}
}
}
]
}
}
}