This API doesn't yet exist.
I do agree it would be useful (necessary) for users who have a
customized deletion policy that keeps around certain prior commits,
and wants to selectively open readers against these past commits. I
like your proposed methods; I can take this.
On reopen(): I think if you call this on an IndexReader explicitly
opened against a prior commit, it should just upgrade to the latest
commit?
Also, if you open an explicit commit, it's entirely possible you'll
hit an IOException because that commit was deleted after you listed it
and before you opened it. Normally, IndexReader.open would retry in
such a case (to get the new commit), but it would not do so, and just
throw the IOException, if given an explicit commit to open.
Mike
Jason Rutherglen wrote:
Need to be able to get a list of IndexCommits for a directory. Also
open an IndexReader for each IndexCommit. Am thinking of API such
as. I suppose this could cause problems for reopen.
IndexCommit[] commits = IndexReader.listCommitPoints(Directory
directory);
and
IndexReader.open(IndexCommit commit, Directory directory);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]