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]