You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Andreas Schaefer (JIRA)" <ji...@apache.org> on 2017/11/25 01:18:00 UTC

[jira] [Created] (SOLR-11672) NPE in FacetComponent countFacets()

Andreas Schaefer created SOLR-11672:
---------------------------------------

             Summary: NPE in FacetComponent countFacets()
                 Key: SOLR-11672
                 URL: https://issues.apache.org/jira/browse/SOLR-11672
             Project: Solr
          Issue Type: Bug
      Security Level: Public (Default Security Level. Issues are Public)
          Components: search
    Affects Versions: 6.1.1
            Reporter: Andreas Schaefer


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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org