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

FunctionValues.exist(int) isn't returning false in cases where it should for many "math" based value sources

    Details

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

      Description

      The FunctionValues class contains an exist(int doc) method with a default implementation that returns true - field based DocValues override this method as appropriate, but most of the "function" based subclasses in the code (typically anonymous subclasses of "FloatDocValues") don't override this method when wrapping other ValueSources.

      So for example: the FunctionValues returned by ProductFloatFunction.getValues() will say that a value exists for any doc, even if that ProductFloatFunction wraps two FloatFieldSources that don't exist for any docs

        Attachments

        1. LUCENE-5961.patch
          37 kB
          Hoss Man
        2. LUCENE-5961.patch
          35 kB
          Hoss Man
        3. LUCENE-5961.patch
          2 kB
          Hoss Man

          Issue Links

            Activity

              People

              • Assignee:
                hossman Hoss Man
                Reporter:
                hossman Hoss Man
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: