java-user@lucene.apache.org
[Top] [All Lists]

Re: Unique Fields

Subject: Re: Unique Fields
From: Ion Badita
Date: Wed, 12 Mar 2008 08:01:06 +0200
The "problem" is that my unique field is a title, many terms per field.
I want to make an index with titles and i don't want to have duplicates.

John


Erick Erickson wrote:
You can easily find whether a term is in the index with TermEnum/TermDocs
(I think TermEnum is all you really need).

Except, you'll probably also have to keep an internal map of IDs added since
the searcher was opened and check against that too.

Best
Erick

On Tue, Mar 11, 2008 at 11:04 AM, Ion Badita <ion.badita@xxxxxxxxxxxxxxxxx>
wrote:

Hi,

I want to create an index with one unique field.
Before inserting a document i must be sure that "unique field" is unique.



John

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: java-user-help@xxxxxxxxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>