Is there any performance difference between using the match_all query vs a
query_string of ":"?
I ask because I'm trying to get a list of documents which match a set of
fields, but want to match all documents. The full query looks like this:
{
"query": {
"filtered": {
"query": {
"query_string": {
"query": ":",
"default_operator": "AND"
}
},
"filter": {
"bool": {
"must": [{
"term": {
"campaign_id": "1"
}
}, {
"terms": {
"hash": ["4f7b7b2f105b8b6951f919e657ca6509",
"e44036caa080c94b91aab963bfccc8c8"]
}
}]
}
}
}
},
"size": 30,
"from": 0,
"sort": [{
"date": {
"reverse": true
}
}, "_score"]
}
or
{
"query": {
"filtered": {
"query": {
"match_all": {}
},
"filter": {
"bool": {
"must": [{
"term": {
"campaign_id": "1"
}
}, {
"terms": {
"hash": ["4f7b7b2f105b8b6951f919e657ca6509",
"e44036caa080c94b91aab963bfccc8c8"]
}
}]
}
}
}
},
"size": 30,
"from": 0,
"sort": [{
"date": {
"reverse": true
}
}, "_score"]
}
Lee
"It doesn't matter whether you are liberal or conservative, but it's
dangerous to always think with exclamation points instead of question
marks."
by Marty Beckerman