I have an index in which I am using auto expand replicas to 0-all. This means every node has every replica
So when a search request comes to ES, will it be processed by only one node? I am using 7.2 and the search request is specifically a percolator query. ES doc just says the requests are round-robin'd across the replicas. But given such a setup, it would benefit from executing on just one node right?
Elasticsearch will only search one copy of each shard, but if it is to search multiple shards then it will not necessarily choose copies that are all on the same node. This means the search can benefit from the resources of the whole cluster (CPU, IO bandwidth, filesystem cache etc).
Put differently, if you are searching a single index with number_of_shards: 1 then there will be at most two nodes involved: the coordinating node and one of the data nodes holding a copy of that shard. These might or might not be the same node.
The search profile API and its UI are a good way to see the details of how a search was executed, including the nodes that were involved.
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.