lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Debraj Manna <>
Subject Re: Mapping Solr Exceptions to Error Code while using SolrJ
Date Thu, 25 Feb 2016 07:18:36 GMT

Any help or pointers in this issue?


On Wed, Feb 24, 2016 at 12:44 PM, Debraj Manna <>

> Hi,
> I am using Solrj 5.1 to talk add & delete docs from solr. Whenever there
> is some exception while doing addition or deletion. Solr is throwing
> SolrServerException with the error message in the exception.
> I am trying to map each error to an error code. For example if I am
> getting an exception message "Error from server at
> http://abc-solr4:8585/solr/discovery: user version is not high enough:
> 1456297688" then I want to map this to a more generic error with messages
> "Low User Version" & some error code let;s say XXX. So that later on it
> becomes easier to know what kind of error we are getting,
> The only way I can think of right now is catching the SolrServerException
> & then doing a string match in e.getMessage(). Since the solr is not
> sending and other code.
> Can some one let me know if there is some better way of doing this & how
> do people generally handle error while using solrj?
> Thanks,
> Debraj

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message