Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 98259 invoked from network); 26 Jun 2008 09:35:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Jun 2008 09:35:34 -0000 Received: (qmail 97084 invoked by uid 500); 26 Jun 2008 09:35:29 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 96962 invoked by uid 500); 26 Jun 2008 09:35:29 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 96950 invoked by uid 99); 26 Jun 2008 09:35:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jun 2008 02:35:29 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.132.244] (HELO an-out-0708.google.com) (209.85.132.244) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jun 2008 09:34:38 +0000 Received: by an-out-0708.google.com with SMTP id c37so870809anc.49 for ; Thu, 26 Jun 2008 02:34:55 -0700 (PDT) Received: by 10.100.95.19 with SMTP id s19mr20021244anb.65.1214472895822; Thu, 26 Jun 2008 02:34:55 -0700 (PDT) Received: by 10.100.212.4 with HTTP; Thu, 26 Jun 2008 02:34:55 -0700 (PDT) Message-ID: <9ac0c6aa0806260234p1484cc7ev54a7e5a95a8ae5ac@mail.gmail.com> Date: Thu, 26 Jun 2008 05:34:55 -0400 From: "Michael McCandless" To: java-user@lucene.apache.org Subject: Re: IndexDeletionPolicy to delete commits after N minutes In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org 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 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