Solr
  1. Solr
  2. SOLR-1468

Solrj bug when using facet.missing

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.4
    • Component/s: clients - java
    • Labels:
      None

      Description

      Setting queryParams.setMissing("true") or queryParams.set(FacetParams.FACET_MISSING, "true") in Solrj query parameters object results in an exception:
      ...
      Caused by: org.apache.solr.common.SolrException: parsing error
      at org.apache.solr.client.solrj.impl.XMLResponseParser.processResponse(XMLResponseParser.java:139)
      at org.apache.solr.client.solrj.impl.XMLResponseParser.processResponse(XMLResponseParser.java:100)
      at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:385)
      at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:183)
      at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:90)
      ... 37 more
      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[3,788]
      Message: requires 'name' attribute: int
      at org.apache.solr.client.solrj.impl.XMLResponseParser.readNamedList(XMLResponseParser.java:231)
      at org.apache.solr.client.solrj.impl.XMLResponseParser.readNamedList(XMLResponseParser.java:236)
      at org.apache.solr.client.solrj.impl.XMLResponseParser.readNamedList(XMLResponseParser.java:236)
      at org.apache.solr.client.solrj.impl.XMLResponseParser.readNamedList(XMLResponseParser.java:236)
      at org.apache.solr.client.solrj.impl.XMLResponseParser.processResponse(XMLResponseParser.java:124)
      ... 41 more

      When "facet.missing" parameter is set to "true" Solr is returning response containing "int" element with no "name", which possibly causes the Solrj parsing problem. Sample server response may look like:

      <lst name="genre">
      <int name="rock">5559</int>
      <int name="soul">5547</int>
      <int name="punk">5412</int>
      <int>0</int>
      </lst>

        Activity

        Hide
        Yonik Seeley added a comment -

        I just committed a patch for this... thanks for the bug report!

        Show
        Yonik Seeley added a comment - I just committed a patch for this... thanks for the bug report!
        Hide
        Grant Ingersoll added a comment -

        Bulk close for Solr 1.4

        Show
        Grant Ingersoll added a comment - Bulk close for Solr 1.4

          People

          • Assignee:
            Yonik Seeley
            Reporter:
            Tomasz Wrobel
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development