OK, so I have to query for a list of old documents (from a given date) and delete each document individually?
Can I use DateFilter.Before() with Term? Thanks, Ben On Mon, 28 Mar 2005 02:13:48 -0600, Chris Lamprecht <[EMAIL PROTECTED]> wrote: > Ben, > > If you know the exact terms you want to delete, you can do it without > querying: > > IndexReader reader = IndexReader.open(indexDir); > Term deleteTerm = new Term("yyyymmdd", yyyymmdd); > reader.delete(deleteTerm); > > If you are using a lucene date field, I think you'll have to enumerate > through all the dates that you want to delete. You can use > reader.terms(Term) to get an enumeration of terms. > > -chris > > On Mon, 28 Mar 2005 17:58:44 +1000, Ben <[EMAIL PROTECTED]> wrote: > > BTW is it possible to do what I am trying to achieve without querying > > the database or the index? > > > > Thanks, > > Ben > > > > On Mon, 28 Mar 2005 10:38:52 +1000, Ben <[EMAIL PROTECTED]> wrote: > > > Hi > > > > > > I need to delete a number of documents that are older than a > > > particular time from a Lucene index. What is the best way to do this? > > > > > > Thanks, > > > Ben > > > > > > > --------------------------------------------------------------------- > > 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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]