solr4 - Updating document in solr cloud 4.4 -


i have solr cloud 4.4 set two shards.the shards in 2 different machine. have indexed documents using cloudsolrserver of solr client 4.2.0. while updating documents of documents getting updated while others not getting updated , exception "org.apache.solr.common.solrexception: no active slice servicing hash code f02c79de in doccollection(myindex)={" "myindex" name of index. code updating documents follows:

      cloudsolrserver server = new cloudsolrserver("myip:9983");   server.setdefaultcollection("myindex");       list<solrinputdocument> solrinputdocslist = new arraylist<solrinputdocument>();       solrinputdocument solrinputdoc = new solrinputdocument();        list<string> serviceslist = new arraylist<string>();       serviceslist.add("hockey1");       serviceslist.add("blogger1");       map<string, list<string>> services = new hashmap<string, list<string>>();       services.put("set", serviceslist);       solrinputdoc.addfield("services",services);         solrinputdoc.addfield("id",id);        solrinputdocslist.add(solrinputdoc);        server.add(solrinputdocslist);       server.commit(); 

my question are: 1) when document indexed how decides document goes shard. 2) why update of documents failing.

for question 1, check article http://searchhub.org/2013/06/13/solr-cloud-document-routing/

the idea can tell solrcloud put documents generating id field following pattern shard_key!document_id

everything shares shard_key placed in same shard

for question 2, had same problem , fixed cleaning configuration zookeeper had stored

regards, randall rosales


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -