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.
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?
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.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.