Re: 答复: solr shards

2013-02-25 Thread rulinma
I give some comments to this tompic: 1 compoisteId with setting numshards 1.1 uinique id (hash alogrith to set shard) 1.2 espically, prefix with "!" will be route to same shard if you set "!" in id 2 not set numshars 2.1 user using "_field_"(schema.xml) to set where to sink d

Re: 答复: solr shards

2013-02-22 Thread Erick Erickson
Basically a hash is performed (details I'm not entirely sure about) and the doc is sent to shard (hashed id)%(num shards). Really, though, I'm not sure there's a good reason to dig into the details other than curiosity. If you change the number of shards, you'll get into trouble. All that said

答复: solr shards

2013-02-20 Thread Rollin.R.Ma (lab.sh04.Newegg) 41099
Now it is ok truly, but I met the trouble yesterday, I guess the environment problem. Anyone can give me some advice about the algorithm of the hash router. I test id(1,4) go to shard1 (2,3) go to shard2. What is the algorithm ? Thanks a lot. -邮件原件- 发件人: Mark Miller [mailto:markrmil...@

答复: solr shards

2013-02-20 Thread Rollin.R.Ma (lab.sh04.Newegg) 41099
Hi I user below code is right: SolrInputDocument doc1 = new SolrInputDocument(); doc1.addField("id", "1"); doc1.addField("name", "11s"); SolrInputDocument doc2 = new SolrInputDocument();