Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-6719

NumericUtils.getMinLong and NumericUtils.getMaxLong have undefined behavior when no docs have value - throw NPE

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      Tracked down a possible cause of SOLR-7866 to situations where a (numeric) field doesn't have any values in an index and you try to get the min/max.

      javadocs for NumericUtils.getMinLong and NumericUtils.getMaxLong don't actually say what that method will do in this case, throw NPE when it happens

        Attachments

        1. LUCENE-6719.patch
          1 kB
          Hoss Man
        2. LUCENE-6719.patch
          6 kB
          Hoss Man
        3. LUCENE-6719.patch
          5 kB
          Timothy Potter
        4. LUCENE-6719.patch
          6 kB
          Timothy Potter

          Issue Links

            Activity

              People

              • Assignee:
                thelabdude Timothy Potter
                Reporter:
                hossman Hoss Man
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: