Re: Eliminate duplicates

2007-03-20 Thread Doron Cohen
Another option for this might be IndexWriter.updateDocument(). "Erick Erickson" <[EMAIL PROTECTED]> wrote on 18/03/2007 15:28:09: > BTW, instead of searching with a query, it might be faster > to use TermEnum on your unique field. If TermEnum finds > a term like the one you're about to add, you a

Re: Eliminate duplicates

2007-03-18 Thread Erick Erickson
But I think you have a problem here with searching the lucene index and deleting duplicate titles. Say you have the following titles: title one title one is a nice file title one is a really nice file Further assume you're about to add a duplicate "title one" Searching on "title one" will give y

Re: Eliminate duplicates

2007-03-18 Thread Otis Gospodnetic
Markus, What you were thinking is fine - search and, if found, delete first, then add. Lucene allows duplicate and offers no automated way for avoiding them. Otis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Simpy -- http://www.simpy.com/ - Tag - Search - Share - Origi