lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless" <luc...@mikemccandless.com>
Subject Re: IndexDeletionPolicy to delete commits after N minutes
Date Thu, 26 Jun 2008 09:34:55 GMT
The unit test for DeletionPolicy has an example called
"ExpirationTimeDeletionPolicy".  You can see its source here:

  http://svn.apache.org/viewvc/lucene/java/tags/lucene_2_3_2/src/test/org/apache/lucene/index/TestDeletionPolicy.java?revision=653677&view=markup

Note that the DeletionPolicy is given IndexCommit instances, whose
"delete" method you call when you no longer need that commit point.
You don't delete the files yourself (IndexWriter works out which files
to delete based on which commits you've deleted).

Mike

Alex Cheng <chy1013m1@gmail.com> wrote:
> hi,
> what is the correct way to instruct the indexwriter (or other
> classes?) to delete old
> commit points after N minutes ?
> I tried to write a customized IndexDeletionPolicy that uses the
> parameters to schedule future
> jobs to perform file deletion. However, I am only getting the
> filenames through the parameters
> and not absolute file names.
>
> thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message