Issue Details (XML | Word | Printable)

Key: LUCENE-1311
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Michael McCandless
Reporter: Michael McCandless
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Lucene - Java

Add ability to open prior commits to IndexReader

Created: 20/Jun/08 11:16 AM   Updated: 11/Oct/08 12:49 PM
Return to search
Component/s: Index
Affects Version/s: 2.3
Fix Version/s: 2.4

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works LUCENE-1311.patch 2008-06-20 01:26 PM Michael McCandless 12 kB

Lucene Fields: New
Resolution Date: 24/Jun/08 03:41 PM


 Description  « Hide
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



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Michael McCandless added a comment - 20/Jun/08 01:26 PM
Attached patch. All tests pass. I plan to commit in a day or two.