Thanks Erick.

I had replicationFactor=1 in my old collection and going to have the same
config for the new collection.
When I create a new collection with number of Shards =20 and max shards per
node = 1, the shards are going to start on 20 hosts out of my 25 hosts Solr
cluster. When you say "get each shard's index to the corresponding shard on
your new collection", do you mean the following?

shard1_replica1 -> core_node1 (old collection)
shard1_replica1 -> has to be core_node1 (new collection) (I don't have this
mapping for the old collection as the collection no longer exists!!)

Thanks,
Chetas.

On Mon, Nov 7, 2016 at 1:03 PM, Erick Erickson <erickerick...@gmail.com>
wrote:

> That should work. The caveat here is that you need to get the each
> shards index to the corresponding shard on your new collection.
>
> Of course I'd back up _all_ of these indexes before even starting.
>
> And one other trick. First create your collection with 1 replica per
> shard (leader-only). Then copy the indexes (and, btw, I'd have the
> associated Solr nodes down during the copy) and verify the collection
> is as you'd expect.
>
> Now use ADDREPLICA to expand your collection, that'll handle the
> copying from the leader correctly.
>
> Best,
> Erick
>
> On Mon, Nov 7, 2016 at 12:49 PM, Chetas Joshi <chetas.jo...@gmail.com>
> wrote:
> > I have a Solr Cloud deployed on top of HDFS.
> >
> > I accidentally deleted a collection using the collection API. So,
> ZooKeeper
> > cluster has lost all the info related to that collection. I don't have a
> > backup that I can restore from. However, I have indices and transaction
> > logs on HDFS.
> >
> > If I create a new collection and copy the existing data directory to the
> > data directory path of the new collection I have created, will I be able
> to
> > go back to the state where I was? Is there anything else I would have to
> do?
> >
> > Thanks,
> >
> > Chetas.
>

Reply via email to