You need some kind of unique ID for you documents like a primary key in a RDB. If you have something like that you can call IndexWriter#updateDocument(uniqueIDTerm, document) this will delete the old document and add the new one.
simon On Tue, Nov 10, 2009 at 10:05 AM, m.harig <m.ha...@gmail.com> wrote: > > hello all, > > This is my situation , i've multiple indexes , for example , index1 , > index2 , index3 ... i've to update the indexes every night . If i open my > IndexWriter create=false (since i want to update the existing index) , am > getting duplicate documents appends with the existing indexes , anyone help > how do i remove duplicate documents by updating the existing index?????? > -- > View this message in context: > http://old.nabble.com/remove-duplicate-when-merging-indexes-tp26280244p26280244.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org