It is mentioned in the breaking changes section of elasticsearch 5.0.0 that query
is obsolete after filters and queries have been merged. What does that mean? Can someone explain this with an example?
You used to be able to write:
{
"constantScore" : {
"filter" : {
"query" : {
"query_string" : {
"query" : "this AND that OR thus"
}
}
}
}
}
This is saying that the filter named query
is now gone. It isn't very clear though.
Thanks, that's more clear. Is the first query below still valid? I prefer to use the bool query.
query
{
"query":{
"term":{
"city":"Paris"
}
}
}
bool query
{
"query":{
"bool":{
"must":{
"term":{
"city":"Paris"
}
}
}
}
}
They are both fine, sure.