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

Inconsistent return of documents in TermsEnum.postings after unsuccesful TermsEnum.seekExact(bytes)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • None
    • None
    • core/index
    • None
    • Linux / Centos X64:
      3.14.33-26.47.amzn1.x86_64 #1 SMP Wed Feb 11 22:39:25 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

    • New

    Description

      Depending on the number of segments, TermsEnum.seekExact(bytes) to find a non-existing term, followed by TermsEnum.postings() is inconsistently returning different results.

      When optimized (to 1 segment in my test), the TermsEnum.postings() return the PostingsEnum with documents associated with the next entry in the terms list, if the term does not exist in the list.
      If the core is not optimized, TermsEnum.postings() returns null.

      In both cases, the TermsEnum.seekExact(bytes.toBytesRef()) and consecutive TermsEnum.term appears to have advanced to the next entry (relative to the non-existing term).

      Attachments

        Activity

          People

            Unassigned Unassigned
            JeroenB Jeroen Baas
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: