The only way to do it is to index a field (self maintained primary key) with
each document and do a deleteDocument (or updateDocument) for each document
before adding it.
Something like
*writer.deleteDocument(new Term("term-key","unique-id"));*
*writer.addDocument(d);*
This should help.
--
Anshum Gupta
Naukri Labs!
http://ai-cafe.blogspot.com

The facts expressed here belong to everybody, the opinions to me. The
distinction is yours to draw............


On Fri, Oct 30, 2009 at 12:20 PM, DHIVYA M <dhivyakrishna...@yahoo.com>wrote:

> Thanks a lot sir. Its working out well.
>
> But i have one more doubt.
> Is it possible to check whether the same documents are indexed again and
> again?
> bcos due to appending of indexes,
> when i search a query,
> the result is displayed as much number of times as the index is created for
> that document.
>
> how to solve this sir
>
> Is it possible to remove duplicates with a flag in indexwriter?
>
> Kindly let me know about this.
>
> Thanks in advance
> M.Dhivya
>
>
>      Keep up with people you care about with Yahoo! India Mail. Learn how.
> http://in.overview.mail.yahoo.com/connectmore

Reply via email to