On May 18, 2012, at 10:26 AM, Shawn Heisey wrote: > On 5/18/2012 1:42 AM, Jamel ESSOUSSI wrote: >> I have an incorrect schema --> a missing field : >> >> and when I add a documents (UpdateResponse ur = solrServer.add(docs), I have >> not be able to catch exception in solrj and the UpdateResponse cannot handle >> result in UpdateResponse. >> >> I use solr-core3.6, solr-solrj3.6 and solr.war4.0 > > Which SolrServer implementation are you using? If you are using > ConcurrentUpdateSolrServer (or its httpclient 3.x predecessor, > StreamingUpdateSolrServer), your program will never be able to detect when an > error occurs.
That is not strictly true. There is an error handling method you can override - currently it simply logs an exception. It's not an ideal solution, you won't have fine grained doc -> error detection, but you can in fact detect that an error has occurred. > You must use HttpSolrServer if exception handling is a requirement. > > If you are already using HttpSolrServer or CommonsHttpSolrServer, then I fear > your problem is beyond my experience. > > Thanks, > Shawn > - Mark Miller lucidimagination.com