Multisearch vs multiple search requests


I have k queries to do, each one of them gets a few records for some ID. The only difference is the filter value which is the ID.

Is there any performance benefit to running a multisearch query (bulk) that contains all k queries, versus just making k single search calls to Elasticsearch?


The msearch just save on some coordination on your end. All it does is send the requests together to a single node, make the requests in parallel for you and returns the results.

1 Like

Another question in the same topic:

  1. It's really interesting to know how Kibana addresses this situation. Aftera ll, one dashboard contains K graphs. Does it sends all the requests in multi search API or one by one?

  2. What exactly the max_concurrent_searches parameter does? As far as my understanding - using multi search could even be worse for some situations. Instead of dividing the K search requests between all available nodes, and therefore getting a real parallel experience, we are using only one available coordinating node. On the other hand, in the customer retrospective who wait for ALL the requests to return - this might lead the cluster to make the requests in the right order.

Pretty confusing, ha? :slight_smile: