lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anshum <>
Subject Re: soln found for index overwritting problem
Date Fri, 30 Oct 2009 07:21:27 GMT
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"));*
This should help.
Anshum Gupta
Naukri Labs!

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 <>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.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message