Multi match query in a boolean query, filtered with aggregations


(Isaac Perez Moncho) #1

Hi,

we are testing the new elasticsearch 5 and almost none of the previous queries work :frowning:

How could I make this be a multi match instead of a match_all:

{
"query": {
"bool": {
"must": {
"match_all": {}
},
"filter": {
"range": {
"price": {"gte": 0, "lte": 2}
}
}
}
},
"_source": ["categories.raw"],
"aggs": {
"categories": {
"terms": {"field": "categories.raw", "size": 1000}
}
}
}

Tried to replace the match_all with a multimatch one, but doesn't seem to work straight away.
Any ideas?

Thanks,
Isaac


(system) #2