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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to