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

addIndexes(IndexReader) incorrectly applies existing deletes

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    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

          Activity

            People

            • Assignee:
              shaie Shai Erera
              Reporter:
              shaie Shai Erera

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment