What is the different between these two queries?
{
"query" : {
"match" : {
"field_1" : true
}
},
"filter" : {
"and" :
[
{
"exists" : {"field" : "field_2"}
},
{
"term" : {"field_3" : "alien"}
}
]
}
}
{
"query" : {
"filtered" : {
"query" : {
"match" : {
"field_1" : true
}
},
"filter" : {
"and" :
[
{
"exists" : {"field" : "field_2"}
},
{
"term" : {"field_3" : "alien"}
}
]
}
}
}
}
is there a reason why one would choose the one against the other? I looked through the doc and can't find any thing explaining the differences.