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

NestableJsonFacet ClassCastException in SolrJ 7.6+

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 7.6, 7.7, 7.7.1
    • Fix Version/s: None
    • Component/s: SolrJ
    • Labels:
      None

      Description

      Identified by Gerald Bonfiglio on the mailing list: http://mail-archives.apache.org/mod_mbox/lucene-solr-user/201903.mbox/%3C2B629E99E8E563409788D895FACA8198AA754A96%40mbx031-w1-co-4.exch031.domain.local%3E

      I have also encountered this issue where NestableJsonFacet occasionally receives the facet count as a Long value but blindly casts to int when assigning to domainCount, causing a ClassCastExcption. I have a fix to instead check if the count value is instanceof Number, then use Number.longValue() to safely unbox to long.

        Attachments

        1. SOLR-13377.patch
          1.0 kB
          Owen Clarke

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                oclarke Owen Clarke
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: