Elasticsearch 2 - filtered query


(mramaprasad) #1

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
}
}
}
}
}
}
}
}


Deprecation of filtered in elasticsearch 2.0
(Colin Goodheart-Smithe) #2

This does not seem to be a question. You have also asked something that appears to be the same on another thread: Filtered query in Elasticsearch 2 . Please keep the conversation to one thread to avoid it becoming disjointed


(Colin Goodheart-Smithe) #3