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 Steinar Asbjørnsen <st...@gmail.com> on 2009/10/26 10:32:25 UTC

copyField from multiple fields into one

Hi all.

I'm currently working on setting up spelling suggestion functionality.
What I'd like is to put the values of two fields ("keyword" and "name") 
into the spell-field.
Something like (from schema.xml):
<field name="spell" type="textSpell" indexed="true" stored="true"  
multiValued="true"/>
...
<copyField source="keyword" dest="spell"/>
<copyField source="name" dest="spell"/>

As far as i can see I only get suggestions from the keyword-field, and  
not from the name-field.

So my question is:
Is it possible to copy both "keyword" and "name" into the "spell"-field?

Thanks,
Steinar


Re: copyField from multiple fields into one

Posted by Steinar Asbjørnsen <st...@gmail.com>.
The "name"-field is populated.
But I cannot see that solr gives me any suggestions based on that field.
Seems to work fine with the "keyword"-field tho.

Regards,
Steinar

Den 26. okt. 2009 kl. 10.38 skrev Avlesh Singh:

> It should have worked as expected.
> See if your "name" field is getting populated.
>
> Cheers
> Avlesh
>
> 2009/10/26 Steinar Asbjørnsen <st...@gmail.com>
>
>> Hi all.
>>
>> I'm currently working on setting up spelling suggestion  
>> functionality.
>> What I'd like is to put the values of two fields ("keyword" and  
>> "name")into
>> the spell-field.
>> Something like (from schema.xml):
>> <field name="spell" type="textSpell" indexed="true" stored="true"
>> multiValued="true"/>
>> ...
>> <copyField source="keyword" dest="spell"/>
>> <copyField source="name" dest="spell"/>
>>
>> As far as i can see I only get suggestions from the keyword-field,  
>> and not
>> from the name-field.
>>
>> So my question is:
>> Is it possible to copy both "keyword" and "name" into the "spell"- 
>> field?
>>
>> Thanks,
>> Steinar
>>
>>


Re: copyField from multiple fields into one

Posted by Avlesh Singh <av...@gmail.com>.
It should have worked as expected.
See if your "name" field is getting populated.

Cheers
Avlesh

2009/10/26 Steinar Asbjørnsen <st...@gmail.com>

> Hi all.
>
> I'm currently working on setting up spelling suggestion functionality.
> What I'd like is to put the values of two fields ("keyword" and "name")into
> the spell-field.
> Something like (from schema.xml):
> <field name="spell" type="textSpell" indexed="true" stored="true"
> multiValued="true"/>
> ...
> <copyField source="keyword" dest="spell"/>
> <copyField source="name" dest="spell"/>
>
> As far as i can see I only get suggestions from the keyword-field, and not
> from the name-field.
>
> So my question is:
> Is it possible to copy both "keyword" and "name" into the "spell"-field?
>
> Thanks,
> Steinar
>
>