Re: SolrCloud removing shard (how to not loose data)

2013-01-13 Thread Erick Erickson
I don't think this will work in the long run with Solr4 (not sure you're
using this or not). Solr4 will assign updates to a shard based on a hash of
the uniqueKey. So let's say you have docs on  your original three shards:
shard 1 has docs 1, 4, 7
shard 2 has docs 2, 5, 8
shard 3 has docs 3, 6, 9

Now you merge shards 2 and 3, and you have
shard 1 - 1, 4, 7
shard 2 - 2, 3, 5, 6, 8, 9

Now if you update docs 1 or 2, everything's fine. But, if you re-index doc
3, it'll be assigned shard 1. Now you have two live documents on different
shards with the same ID. You'll get both back for searches, one will be
stale, etc. This is a Bad Thing.

And even if you're on 3.x and assigning docs to shards yourself, you now
have pretty unbalanced shards, shard2 is twice as big as shard1.

NOTE: The actual doc-shard assignment is NOT a simple round-robin, this is
just for illustration

Unless re-indexing is _really_ expensive, I'd just count on re-indexing
when changing the number of shards. At least until shard splitting is in
place for Solr4. And I'm not sure shard splitting will also handle shard
merging, I'd check before assuming so...

Best
Erick


On Fri, Jan 11, 2013 at 8:47 AM, mizayah miza...@gmail.com wrote:

 Seams I'm to lazy.
 I found this http://wiki.apache.org/solr/MergingSolrIndexes, and it works
 rly.



 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/SolrCloud-removing-shard-how-to-not-loose-data-tp4032138p4032508.html
 Sent from the Solr - User mailing list archive at Nabble.com.



Re: SolrCloud removing shard (how to not loose data)

2013-01-11 Thread mizayah
Mark, I know i still have access to data and i can woke ap shard again.

What i want to do is.


I have 3 shards on 3 nodes, one on each. Now i discower that i dont need 3
nodes and i want only 2.
So i want to remove shard and put data from it to these who left.

Is there way to index that data without force index it again?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/SolrCloud-removing-shard-how-to-not-loose-data-tp4032138p4032459.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: SolrCloud removing shard (how to not loose data)

2013-01-11 Thread mizayah
Seams I'm to lazy.
I found this http://wiki.apache.org/solr/MergingSolrIndexes, and it works
rly.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/SolrCloud-removing-shard-how-to-not-loose-data-tp4032138p4032508.html
Sent from the Solr - User mailing list archive at Nabble.com.


SolrCloud removing shard (how to not loose data)

2013-01-10 Thread mizayah
Lets say i got one collection with 3 shards. Every shard contains indexed
data.

I want to unload one shard. Is there any way for data from unloaded shard to
be not lost?
How to remove shard with data withoud loosing them?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/SolrCloud-removing-shard-how-to-not-loose-data-tp4032138.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: SolrCloud removing shard (how to not loose data)

2013-01-10 Thread Otis Gospodnetic
Hi,

There may be a slicker way,  but one way is to take an index
snapshot/backup before unloading. Search recent messages on this list for
pointers.

Otis
Solr  ElasticSearch Support
http://sematext.com/
On Jan 10, 2013 5:18 AM, mizayah miza...@gmail.com wrote:

 Lets say i got one collection with 3 shards. Every shard contains indexed
 data.

 I want to unload one shard. Is there any way for data from unloaded shard
 to
 be not lost?
 How to remove shard with data withoud loosing them?



 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/SolrCloud-removing-shard-how-to-not-loose-data-tp4032138.html
 Sent from the Solr - User mailing list archive at Nabble.com.



Re: SolrCloud removing shard (how to not loose data)

2013-01-10 Thread Mark Miller
If you do a standard unload, it won't remove any of the on disk data. You have 
to explicitly ask for that. So you can do a vanilla unload and pull that core 
out of rotation - later you can recreate the core with the same parameters it 
had, and it will come back with the same data it had.

- Mark

On Jan 10, 2013, at 5:17 AM, mizayah miza...@gmail.com wrote:

 Lets say i got one collection with 3 shards. Every shard contains indexed
 data.
 
 I want to unload one shard. Is there any way for data from unloaded shard to
 be not lost?
 How to remove shard with data withoud loosing them?
 
 
 
 --
 View this message in context: 
 http://lucene.472066.n3.nabble.com/SolrCloud-removing-shard-how-to-not-loose-data-tp4032138.html
 Sent from the Solr - User mailing list archive at Nabble.com.



Re: SolrCloud removing shard (how to not loose data)

2013-01-10 Thread Upayavira
Why do you want to unload one shard of a collection? Doing so would
render your collection incomplete and therefore non-functional. It'd
help to understand a bit more what you're trying to achieve.

Upayavira

On Thu, Jan 10, 2013, at 10:17 AM, mizayah wrote:
 Lets say i got one collection with 3 shards. Every shard contains indexed
 data.
 
 I want to unload one shard. Is there any way for data from unloaded shard
 to
 be not lost?
 How to remove shard with data withoud loosing them?
 
 
 
 --
 View this message in context:
 http://lucene.472066.n3.nabble.com/SolrCloud-removing-shard-how-to-not-loose-data-tp4032138.html
 Sent from the Solr - User mailing list archive at Nabble.com.