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

NPE in FacetComponent countFacets()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 6.1.1
    • None
    • faceting, search
    • None

    Description

      I have a SOLR installation with two shards and this Facet Query configuration:

      <lst name="invariants">
      <str name="facet.query">

      {!key="$0 - $50"}

      price_d:[* TO 50]</str>
      ....
      </lst>

      When I run a query and the first shard returns a facet count less than the minimum count then it will remove that Facet Query from the list FacetInfo.queryFacets map in the method: removeQueryFacetsUnderLimits(). When the Facet Component is handled for the second shard the get() on FacetInfo.queryFacets will return null (entry was removed) and the subsequent call to qf.count() is throwing an NPE.

      This code will fix the NPE but in my opinion the removal of the Query Facets should be moved to finishStage() method in order to make sure that countFacets() works w/o an NPE.

      This issue was previously reported under 2803 as far as I understand it.

      I am working on the 6.1.0-SNAPSHOT code base but looking at the latest code this still seems to be an issue.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              andysch Andreas Schaefer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: