问题
_msearch
is used for multiple searches in one go. This alone is a performance improvement since it reduces the network overhead.
Right now I'm using _msearch
like the _search
endpoint, for single queries. I wanted to have this mechanism in place for future batch processing. Until I take advantage of the batch processing will this introduce an overhead? Does _msearch
behave exactly the same as _search
for single queries?
回答1:
There's a very small overhead in the sense that even if you have one query, the _msearch
endpoint will still need to iterate over it and create a single search query.
However, I would consider this overhead as clearly negligible.
回答2:
_msearch is multi search it takes a little over head than the _search because The multi search API allows to execute several search requests within the same API.
来源:https://stackoverflow.com/questions/39990856/msearch-vs-search-performance