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

FieldCache.getDocTermOrds back to the future bug

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.2, 6.0
    • None
    • None
    • New

    Description

      Found while working on LUCENE-4765:

      FieldCache.getDocTermOrds unsafely "bakes in" liveDocs into its structure.

      This means in cases if you have readers at two points in time (r1, r2), and you happen to call getDocTermOrds first on r2, then call it on r1, the results will be incorrect.

      Simple fix is to make DocTermOrds uninvert take liveDocs explicitly: FieldCacheImpl always passes null, Solr's UninvertedField just keeps doing what its doing today (since its a top-level reader, and cached somewhere else).

      Also DocTermOrds had a telescoping ctor that was uninverting twice.

      Attachments

        1. LUCENE-4790.patch
          8 kB
          Robert Muir

        Activity

          People

            Unassigned Unassigned
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: