lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Re: Obtain IndexCommits from directory
Date Tue, 17 Jun 2008 09:39:16 GMT

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  

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, 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.


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
> commit, Directory directory);

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message