On 3/17/2015 10:36 AM, pramodEbay wrote: > We are using 3 shard solr cloud with 5 replicas per shard. We use SolrJ to > execute solr queries. Often times, I cannot explain when, but we see in the > query, isShard=true and shard.url=<ip addresses of all the replicas>. > > My questions are, > > 1. Why does this happen intermittently > 2. When this happens, will it send requests to all the replicas in the shard > and slow us down. > 3. Most importantly, how can we avoid this situation. > > We also use zookeeper to manage our cluster. I am concerned that, if we add > more replicas to each shard, this query will become slower.
The requests from your SolrJ client do NOT have isShard=true. >From there, because your index is distributed (it has three shards), Solr itself will send sub-requests that have isShard=true to the other nodes, collect the information to determine the final result set, then send ANOTHER request to each of the shards to collect the actual results. The nodes (replicas) that SolrCloud will use to fulfill the distributed request are chosen at random. Queries are not likely to slow down if you add replicas, unless you are not adding additional hardware. If you are adding additional hardware, they may in fact get faster. Indexing may slow down a little bit. Thanks, Shawn