Hi, we're using elasticsearch 5.3.0 and noticed something weird. Here are my queries using _msearch and _search:
_msearch (/_msearch)
{ "index": "us_import", "type": "shipment", "preference": "_replica_first" }
{ "query": { "match_phrase": { "_all": "manga" } }, "_source": [], "size": 0, "aggregations": { "consignee": { "terms": { "field": "Consignee.Name.untouched" } } } }
_search (/us_import/shipment/_search?preference=_replica_first)
{
"query": {
"match_phrase": {
"_all": "manga"
}
},
"aggs": {
"consignee_terms": {
"terms": {
"field": "Consignee.Name.untouched"
}
}
},
"_source": [],
"size": 0
}
As far as I know, these are identical queries. I was experimenting around msearch and tried these two queries, which should have the same running time but was surprised with the results.
The msearch query took around 4 seconds while the search took around 8, which shouldn't be the case since they are supposedly the same query. Is this because of our elasticsearch version or is msearch really supposed to be faster than the normal search. If so, what is the explanation?
Here are the screenshots of the requests and response times, if you need them. I also make sure to reset the cache before doing these queries.
_search
_msearch

