for a filtered query, according to Elasticsearch 2 documentation -
Use the bool query instead with a must clause for the query and a filter clause for the filter.
Should the following query ok?
"from" : 0,
"size" : 10,
"query" : {
"bool" : {
"must" : {
"multi_match" : {
"query" : "java",
"fields" : [ "title", "description" ]
}
},
"filter" : {
"bool" : {
"filter" : {
"range" : {
"pubdate" : {
"from" : "2013-01",
"to" : "2014-08",
"include_lower" : true,
"include_upper" : true
}
}
}
}
}
}
}
}