Lucene - Core
  1. Lucene - Core
  2. LUCENE-2513

IndexReader overwrites future commits when you open it on a past commit

    Details

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

      Description

      Hit this on trying to build up a test index for perf testing...

      IndexReader (and Writer) accept an IndexCommit on open.

      This is quite powerful, because, if you use a deletion policy that keeps multiple commits around, you can open a not-current commit, make some changes, write a new commit, all without altering the "future" commits.

      I use this to first build up a big wikipedia index, including one commit w/ multiple segments, then another commit after optimize(), and then I open an writable IR to perform deletions off of both those commits. This gives me a single test index that has all four combinations (single vs multi segment; deletions vs no deletions).

      But IndexReader has a bug whereby it overwrites the segments_N file. (IndexWriter works correctly).

      1. LUCENE-2513.patch
        9 kB
        Michael McCandless

        Activity

        Hide
        Robert Muir added a comment -

        reopening for possible 2.9.4/3.0.3 backport.

        Show
        Robert Muir added a comment - reopening for possible 2.9.4/3.0.3 backport.

          People

          • Assignee:
            Michael McCandless
            Reporter:
            Michael McCandless
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development