I haven't followed the whole thread, but this looks weird: reader = reader.open(dir); if (reader != null) { reader.open(index_path);
reader.open called twice? Why? Also, you'll get more help on [EMAIL PROTECTED] list. Otis ----- Original Message ---- From: "Kodumuri, Madhavi" <[EMAIL PROTECTED]> To: general@lucene.apache.org Sent: Fri 27 Jan 2006 04:26:44 PM EST Subject: RE: updating Lucene Index I tried doing this, but I guess I am doing something wrong. This is my snippet, can you please let me know what I was doing wrong. Index_path is the path for the index database url is the one of the Field in my Documents I added, Directory dir = FSDirectory.getDirectory(index_path, false); reader = reader.open(dir); if (reader != null) { reader.open(index_path); String tempUrl = ServerName + url; Term term = new Term("url",tempUrl); reader.delete(term); } Thanks in advance, Madhavi -----Original Message----- From: Fredrik Andersson [mailto:[EMAIL PROTECTED] Sent: Thursday, January 26, 2006 2:28 PM To: general@lucene.apache.org Subject: Re: updating Lucene Index You can delete by any unique term, using an IndexReader. I think this method is wrapped in IndexModifier as well, not sure. If it isn't, just use an IndexReader. yourIndexReader.delete(new Term("yourUniqueField", "yourUniqueValue")); Fredrik On 1/26/06, Kodumuri, Madhavi <[EMAIL PROTECTED]> wrote: > > How do I delete a document from the already existing indexer, as I am > unable to get the indexed ID for that document. > > Thanks for your help, > > Madhavi > > > -----Original Message----- > From: Koji Sekiguchi [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 24, 2006 4:04 PM > To: general@lucene.apache.org > Subject: RE: updating Lucene Index > > even if you use IndexModifier class, > you should delete then addDoc the document to be updated. > > Thanks, > > Koji > > > -----Original Message----- > > From: Fredrik Andersson [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, January 25, 2006 6:58 AM > > To: general@lucene.apache.org > > Subject: Re: updating Lucene Index > > > > > > Hi, > > > > Use the IndexModifier class? > > > > On 1/24/06, Kodumuri, Madhavi <[EMAIL PROTECTED]> wrote: > > > > > > Hi, > > > > > > My Lucene Indexer indexes from scratch with no problem. But I would > like > > > to update the index database next time I run Indexer rather than > > > deleting the database and creating index from scratch every time I > run > > > the Indexer. Is there any Update methods? > > > Any help appreciated, > > > > > > Thanks, > > > > > > Madhavi Kodumuri > > > > > > > > > > > > > >