I have a multi-match query in ES, and wish to add a filter.
{
\"multi_match\" : {
\"query\" : \"this is a test\",
\"fields\" : [ \"subject^2\", \"messa
With Elasticsearch 5 the syntax has changed to the usage of bool query, e.g.
{
"from" : 0,
"size" : 10,
"sort" : "publishDate",
"query": {
"bool": {
"must" : {
"multi_match" : {
"query": "wedding",
"type": "most_fields",
"fields": [ "title", "text" ]
}
},
"filter": {
"term": {
"locale": "english"
}
}
}
}
}
Documentation can be found here.