Solr
  1. Solr
  2. SOLR-3783

Facet pivots produces NPE when facet.missing is turned on

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0, 6.0
    • Labels:
      None

      Description

      We get an http 500 as follow :

      
      <lst name="error">
        <str name="trace">java.lang.NullPointerException</str>
        <int name="code">500</int>
      </lst>
      
      

      When facet.missing is turned on and combined with facet.pivot (if one of the pivot-faceted fields have missing counts -)

      Ideally, the decission tree could be computing for the missing "entries" using the

       -field:[* TO *] 

      query but it might be a performance issue on a large index (I guess)

      The fallback to this could be to raise a 400 error with a clean message telling that both parameters can't be combined and then the documentation should be modified accordingly.

        Activity

        Hide
        Hoss Man added a comment -

        Thanks for reporting this Tanguy,

        The NPE is definitely bad, a pretty clear oversight in the pivot facet code - fixing it doesn't seem to be that hard.

        patch includes test updated tests (which also fixes what appeared to be a mistake in the test – comment suggested it was checking data about the second pivot but it was still checking hte first)

        Show
        Hoss Man added a comment - Thanks for reporting this Tanguy, The NPE is definitely bad, a pretty clear oversight in the pivot facet code - fixing it doesn't seem to be that hard. patch includes test updated tests (which also fixes what appeared to be a mistake in the test – comment suggested it was checking data about the second pivot but it was still checking hte first)
        Hide
        Hoss Man added a comment -

        Committed revision 1387824.
        Committed revision 1387825. - 4x

        Show
        Hoss Man added a comment - Committed revision 1387824. Committed revision 1387825. - 4x
        Hide
        Tanguy Moal added a comment -

        Thank you very much!

        I just patched my copy of Solr 4.0 Beta with it and redeployed my snapshot. Works like a charm.

        Show
        Tanguy Moal added a comment - Thank you very much! I just patched my copy of Solr 4.0 Beta with it and redeployed my snapshot. Works like a charm.
        Hide
        Commit Tag Bot added a comment -

        [branch_4x commit] Chris M. Hostetter
        http://svn.apache.org/viewvc?view=revision&revision=1387825

        SOLR-3783: Fixed Pivot Faceting to work with facet.missing=true (merge r1387824)

        Show
        Commit Tag Bot added a comment - [branch_4x commit] Chris M. Hostetter http://svn.apache.org/viewvc?view=revision&revision=1387825 SOLR-3783 : Fixed Pivot Faceting to work with facet.missing=true (merge r1387824)
        Hide
        Uwe Schindler added a comment -

        Closed after release.

        Show
        Uwe Schindler added a comment - Closed after release.

          People

          • Assignee:
            Hoss Man
            Reporter:
            Tanguy Moal
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development