There are a couple of options here. The collections ADDREPLICA lets you specify the node you want the replica added to. You can specify the shard, collection, and node.
Have you tried just adding replicas to the collection? I _think_ that it'll try to put new nodes on under-utilized machines, but haven't tested for sure. You can also make the core admin API do what you want, there's a trick if you don't want to do it with shard naming, see here: http://heliosearch.org/solrcloud-assigning-nodes-machines/ Best, Erick On Fri, Apr 25, 2014 at 7:46 AM, Ugo Matrangolo <ugo.matrang...@gmail.com> wrote: > Yeah I could do that but I was hoping in something less hacky :p > > > On Fri, Apr 25, 2014 at 3:08 PM, Shawn Heisey <s...@elyograg.org> wrote: > >> On 4/25/2014 3:34 AM, Ugo Matrangolo wrote: >> > I have a running Solr 4.7.1 collection with a single shard replicated >> over >> > 7 nodes. This collection has been created using a replicationFactor=7. >> The >> > idea was to replicate it on all the available nodes (it is a high >> > throughput collection). >> > >> > Recently I have added more nodes to house a different collection and I >> > would like to use them all as replicas for the first collection. >> > >> > From the Solr wiki sounds like there is an ADDREPLICA cmd that I could >> use >> > but seems to me that it will work from Solr 4.8 on. >> > >> > Any suggestion on how to quickly tell Solr to use the new nodes to add >> more >> > replicas to the first collection? >> >> You can simply use the CoreAdmin API to add a new core as a replica of >> an existing shard in an existing collection. Just give it a name that >> you can recognize ... the "collection_shardN_replicaN" naming scheme >> that SolrCloud already uses is good. >> >> http://wiki.apache.org/solr/SolrCloud#Creating_cores_via_CoreAdmin >> >> The ADDREPLICA action looks like it essentially does the same thing, >> except that you can send it to any node in the cloud. With the >> CoreAdmin method, you'd have to send it to the specific Solr node where >> you want to create the new replica. >> >> You would not need to include instanceDir or dataDir. SolrCloud should >> automatically figure those out for you. >> >> Thanks, >> Shawn >> >>