Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-1546

When querying solrj the SolrServerException's cause is null

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Incomplete
    • 1.4
    • None
    • clients - java
    • None
    • solrj

    Description

      Our application processes queries like so:

              try {
                  final SolrServer server = getServer();
                  final QueryResponse resp = server.query(query);
                  return resp;
              } catch (final SolrServerException e) {
                   /// bad things probably happened, invoke error processing and possibly switch to the backup
              }
      

      Given SOLR-874 with dismax queries sometimes causing ParseException from Lucene, I'd like to be able to interrogate the cause chain of the SolrServerException. For example if I found ParseException in the chain, I could provide a specific error message and know that it's not necessary to switch to the backup server.

      As it is now, getCause is giving null. The undesirable fix right now is looking inside the toString/description for the "ParseException" phrase.

      Thanks.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jakeb Jake Brownell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: