schema question

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

schema question

Pradeep Pujari-5
how can I specify uniqueKey value in schema.xml as a concatenation of 3
columns. Like prod_id+attr_name+att_value?

Thanks,
Pradeep
Reply | Threaded
Open this post in threaded view
|

Re: schema question

Koji Sekiguchi
Pradeep Pujari wrote:
> how can I specify uniqueKey value in schema.xml as a concatenation of 3
> columns. Like prod_id+attr_name+att_value?
>
> Thanks,
> Pradeep
>
>  
Solr doesn't support it. You should concatenate them at client.

Koji

--
http://www.rondhuit.com/en/

Reply | Threaded
Open this post in threaded view
|

Re: schema question

Uri Boness
If you're using DataImportHandler than this can easily be done with a
TemplateTranformer. Otherwise, if you really must do it in Solr you can
write your own custom UpdateProcessor and plug it in:

DIH TemplateTransformer:
http://wiki.apache.org/solr/DataImportHandler#TemplateTransformer
Update Processors: http://wiki.apache.org/solr/UpdateRequestProcessor

Cheers,
Uri

Koji Sekiguchi wrote:

> Pradeep Pujari wrote:
>> how can I specify uniqueKey value in schema.xml as a concatenation of 3
>> columns. Like prod_id+attr_name+att_value?
>>
>> Thanks,
>> Pradeep
>>
>>  
> Solr doesn't support it. You should concatenate them at client.
>
> Koji
>
Reply | Threaded
Open this post in threaded view
|

Re: schema question

Bill Bell-4
In reply to this post by Koji Sekiguchi
You could use a copyField.


On 1/17/10 1:47 PM, "Koji Sekiguchi" <[hidden email]> wrote:

> Pradeep Pujari wrote:
>> how can I specify uniqueKey value in schema.xml as a concatenation of 3
>> columns. Like prod_id+attr_name+att_value?
>>
>> Thanks,
>> Pradeep
>>
>>  
> Solr doesn't support it. You should concatenate them at client.
>
> Koji


Reply | Threaded
Open this post in threaded view
|

Re: schema question

Lance Norskog-2
Using copyField will add three different values to the unique id
field; it will not concatenate them into one value. It has to be a
single-valued field. The three values have to be concatenated in DIH
or in the feeding application.

On Sun, Jan 17, 2010 at 6:41 PM, William Bell <[hidden email]> wrote:

> You could use a copyField.
>
>
> On 1/17/10 1:47 PM, "Koji Sekiguchi" <[hidden email]> wrote:
>
>> Pradeep Pujari wrote:
>>> how can I specify uniqueKey value in schema.xml as a concatenation of 3
>>> columns. Like prod_id+attr_name+att_value?
>>>
>>> Thanks,
>>> Pradeep
>>>
>>>
>> Solr doesn't support it. You should concatenate them at client.
>>
>> Koji
>
>
>



--
Lance Norskog
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: schema question

hossman
In reply to this post by Uri Boness

: TemplateTranformer. Otherwise, if you really must do it in Solr you can write
: your own custom UpdateProcessor and plug it in:

Can't the SignatureUpdateProcessorFactory handle this using something like
Lookup3Signature?

(we should really offer a simple "ConcatSignature" implementation for
generating predictable combination keys)

http://wiki.apache.org/solr/Deduplication#solrconfig.xml


-Hoss

Reply | Threaded
Open this post in threaded view
|

Re: schema question

Uri Boness
Yeah, probably the SignatureUpdateProcessorFactory can do the trick, but
you still need to write a custom Signature.
> (we should really offer a simple "ConcatSignature" implementation for
> generating predictable combination keys)
+1

Cheers,
Uri

Chris Hostetter wrote:

> : TemplateTranformer. Otherwise, if you really must do it in Solr you can write
> : your own custom UpdateProcessor and plug it in:
>
> Can't the SignatureUpdateProcessorFactory handle this using something like
> Lookup3Signature?
>
> (we should really offer a simple "ConcatSignature" implementation for
> generating predictable combination keys)
>
> http://wiki.apache.org/solr/Deduplication#solrconfig.xml
>
>
> -Hoss
>
>
>