You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Nishant Chandra <ni...@gmail.com> on 2009/07/24 14:33:09 UTC

Composite Key

Can I use composite key for uniqueKeyId? If yes, how?
Thanks,
Nishant

Re: Composite Key

Posted by Mark Miller <ma...@gmail.com>.
But, if you just want to use it for updating, you could use the
deduplication updateprocessor - it lets you change what fields
control uniqueness for updating - you could add multiple fields as the
signature, and if those fields are the same in another doc, they will
replace previous occurrences instead of adding.
-- 
- Mark

http://www.lucidimagination.com

On Fri, Jul 24, 2009 at 8:43 AM, Erik Hatcher <er...@ehatchersolutions.com>wrote:

>
> On Jul 24, 2009, at 8:33 AM, Nishant Chandra wrote:
>
>> Can I use composite key for uniqueKeyId? If yes, how?
>>
>
> No - you get one field to use for uniqueKey in Solr.  It is your indexer's
> responsibility for aggregating values from your data sources into a single
> uniqueKey value.  For example, in indexing multiple databases typically the
> data source identifier is prefixing the primary key value... "product-1234",
> "customer-567", etc.
>
>        Erik
>
>

Re: Composite Key

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Jul 24, 2009, at 8:33 AM, Nishant Chandra wrote:
> Can I use composite key for uniqueKeyId? If yes, how?

No - you get one field to use for uniqueKey in Solr.  It is your  
indexer's responsibility for aggregating values from your data sources  
into a single uniqueKey value.  For example, in indexing multiple  
databases typically the data source identifier is prefixing the  
primary key value... "product-1234", "customer-567", etc.

	Erik