I'm trying to filter a term to be matching one of the values in an array.
relaying on the ES https://www.elastic.co/guide/en/elasticsearch/guide/current/_finding_multiple_exact_values.html
GET /my_store/products/_search
{
"query" : {
"filtered" : {
"filter" : {
"terms" : {
"price" : [20, 30]
}
}
}
}
}
I tried this:
val res = ESclient.execute {
search in "index" query {
filteredQuery query {
matchall
} filter {
termsFilter("category", Array(1,2))
}
}
But got an error from ES.
How can I do that?