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

addIndexes(IndexReader) incorrectly applies existing deletes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2, 4.0-ALPHA
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      If you perform these operations:

      1. deleteDocuments(Term) for all the new documents
      2. addIndexes(IndexReader)
      3. commit

      Then addIndexes applies the previous deletes on the incoming indexes as well, which is incorrect. If you call addIndexes(Directory) instead, the deletes are applied beforehand, as they should. The solution, as Mike indicated here: http://osdir.com/ml/general/2011-03/msg20876.html is to add flush(false,true) to addIndexes(IndexReader).

      I will create a patch with a matching unit test shortly.

        Attachments

        1. LUCENE-2996.patch
          3 kB
          Shai Erera
        2. LUCENE-2996.patch
          3 kB
          Shai Erera

          Activity

            People

            • Assignee:
              shaie Shai Erera
              Reporter:
              shaie Shai Erera
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: