Constant score vs match all for simple filter


(arthurx) #1

Suppose I just want to get all record with "type" = 2 [integer]. What is the best way to write the query?
Should it be something like
"filtered": {
"query": {
"match_all": {}
},
"filter": {
term": {
"type": 3
}
}
}

or using constant_score?


(system) #2