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

NullPointerException for more like this request handler via SolrJ if the document does not exist

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Incomplete
    • 1.4
    • None
    • None
    • jdk1.6

    Description

      If I query solr with the following (via SolrJ):

      q=myUniqueKey%3AsomeValueWhichDoesNotExist&qt=%2Fmlt&mlt.fl=myMLTField&mlt.minwl=2&mlt.mindf=1&mlt.match.include=false&facet=true&facet.sort=count&facet.mincount=1&facet.limit=10&facet.field=differentFacetField&start=0&rows=10

      I get:

      org.apache.solr.client.solrj.SolrServerException: Error executing query
      at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:95)
      at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:118)
      Caused by: java.lang.NullPointerException
      at org.apache.solr.client.solrj.response.QueryResponse.extractFacetInfo(QueryResponse.java:180)
      at org.apache.solr.client.solrj.response.QueryResponse.setResponse(QueryResponse.java:103)
      at org.apache.solr.client.solrj.response.QueryResponse.<init>(QueryResponse.java:80)
      at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89)

      The xml response of the url is empty and so the info variable at line

      NamedList<Integer> fq = (NamedList<Integer>) info.get( "facet_queries" );

      (QueryResponse) is null. Maybe all variables at QueryResponse.setResponse should be checked against null? Sth. like

      val = res.getVal( i );
      if(val == null) continue;

      ?

      Attachments

        Activity

          People

            Unassigned Unassigned
            peathal Peter Karich
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 20m
                20m
                Remaining:
                Remaining Estimate - 20m
                20m
                Logged:
                Time Spent - Not Specified
                Not Specified