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

Add ability to open prior commits to IndexReader

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4
    • Component/s: core/index
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      If you use a customized DeletionPolicy, which keeps multiple commits
      around (instead of the default which is to only preserve the most
      recent commit), it's useful to be able to list all such commits and
      then open a reader against one of these commits.

      I've added this API to list commits:

      public static Collection IndexReader.listCommits(Directory)

      and these two new open methods to IndexReader to open a specific commit:

      public static IndexReader open(IndexCommit)
      public static IndexReader open(IndexCommit, IndexDeletionPolicy)

      Spinoff from here:

      http://mail-archives.apache.org/mod_mbox/lucene-java-dev/200806.mbox/%3c85d3c3b60806161735o207a3238sa2e6c415171a8019@mail.gmail.com%3e

        Attachments

        1. LUCENE-1311.patch
          12 kB
          Michael McCandless

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: