Lucene - Core
  1. Lucene - Core
  2. LUCENE-1681

DocValues infinite loop caused by - a call to getMinValue | getMaxValue | getAverageValue

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2, 2.3, 2.3.1, 2.3.2, 2.4, 2.4.1, 2.9, 3.0
    • Fix Version/s: 2.9
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      org.apache.lucene.search.function.DocValues offers 3 public (optional) methods to access value statistics like min, max and average values of the internal values. A call to one of the methods will result in an infinite loop. The internal counter is not incremented.
      I added a testcase, javadoc and a slightly different implementation to it. I guess this is not breaking any back compat. as a call to those methodes would have caused an infinite loop anyway.
      I changed the return value of all of those methods to Float.NaN if the DocValues implementation does not contain any values.

      It might be considerable to fix this in 2.4.2 and 2.3.3

      1. DocValues.patch
        7 kB
        Simon Willnauer

        Activity

          People

          • Assignee:
            Mark Miller
            Reporter:
            Simon Willnauer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development