lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Rodenburg <jeff.rodenb...@gmail.com>
Subject Re: Stopping Duplicates
Date Sat, 17 Sep 2005 15:44:31 GMT
Ben -

I can think of two ways to achieve this.

1) While adding your information to the index, query the index for an 
existing record. If you get no match, add the record.
2) Control the exclusivity requirement from your data source, so that no 
duplicate records ever have the opportunity to be indexed.

This is an operational question, so the *best* way depends on your overall 
operation, as both of these approaches have consequences on index 
maintenance operations.

Hope this helps.

-- jeff


On 9/17/05, Ben Gill <ben.d.gill@gmail.com> wrote:
> 
> Hi,
> 
> I am storing names in my index, and am currently getting duplicates
> back (quite correctly, on Lucene's part), because I am storing:
> 
> id name
> 1 fred
> 2 fred
> 
> What I want to happen is, if a duplicate name is added to the index, I
> only ever want one entity to exist with the name....
> 
> What is the best way for me to achieve this?
> 
> Thanks
> 
> Ben
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
>

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