I have a scenario , wherein I would need to perform searches in Elastic , but the number of "concurrent searches" are very less. In this case , can I assume that the searches will go to Primary shards?
My understanding is that , whenever a search is fired, the search will go to Primary shards in general ; it will go to Replica shard only if the Primary shard is busy .
Please let me know if the understanding is correct ?
When does a search goes to Replica shard?
Searches will in general round-robin between primary and replica shards irrespective how busy the cluster is.
Can we configure the search to go to only primary shards ? and go to replica only when primary is busy/not available ?
You can do that by setting preference at the query level. Why would you look to do this? It can cause load imbalance in the cluster.
We have a cluster which is across 2 data centers and we want most of the searches to go to primary data centers as most of the searches are triggered from Application deployed in Primary data center.