On 11/21/2013 9:51 PM, RadhaJayalakshmi wrote: > Thanks Shawn for your response. > So, from your email, it seems that unique_key validation is handled > differently from other field validation. > But what i am not very clear, is what the unique_key has to do with finding > the live server? > Becase if there is any mismatch in the unique_key, it is throwing > SolrServerException saying "No live servers found".. Because live servers > are being sourced by clusterstate of zookeeper. so i feel the unique key is > particular to a core/index. > So looking to understand the nature of this exception. Please explain me how > unique_key and live servers are related
It's the HTTP error code, 500, which means internal server error. SolrJ interprets this to mean that there's something wrong with that server, which is what the HTTP protocol specification says it must do. That makes it try the next server. Because the problem is not actually a server issue, the next server returns the same error. This continues until it's tried them all and gives up. The validation for other fields returns a different error, one that SolrJ interprets as a problem with the request, so it doesn't try other servers. Strictly speaking, Solr probably should not return error 500 for unique key validation issues, which makes this a minor bug. The actual results are correct, because the update fails and the application is notified. If all possible exceptions are caught, then it all works correctly. Thanks, Shawn