On 24 February 2014 14:45, manju16832003 <manju16832...@gmail.com> wrote:
> I'm not sure if I would be missing any configuration params here, however
> when I tried to assign an xpath field from URLDataSource (XML end point) to
> two fields defined in schema.xml.
>
> Here is my scenario,
> I have two fields
> *profile_display* and *profile_indexed*
>
> My assignment in DataImpotHandler looks like this
>
> <entity name="user" dataSource="crm"
>
> url="http://URLTOExternalSystem//ProfileService.svc/";
>                         processor="XPathEntityProcessor"
>                         forEach="/Profiles">
> <field column="profile_display" xpath="/Profile/profile_name" />
> <field column="profile_indexed" xpath="/Profile/profile_name" />
> </entity>
>
> My Scheama.xml config looks like this
> <field name="profile_display" type="string" indexed="true" stored="true"
> multiValued="false" default=""/>
>         <field name="profile_indexed" type="text_general" indexed="true"
> stored="false"  multiValued="false" default=""/>
>
> *So the issue here is, the value is value is always assigned to
> profile_indexed, and profile_display does not contain any value. *
>
> Meaning, if we were to assign xpath field name to different solr fields,
> only the last field contains the data.
>
> The reason I have two fields is that, One to store it as a String to display
> to user, another field where I apply Filter and Tokenizers to do text
> transformation.
Not sure what happens when the same Xpath is applied to two fields
(though I would have thought that this should work). If you need the
same data in two fields that are tokenised in different ways, you can
use Solr's CopyField: http://wiki.apache.org/solr/SchemaXml#Copy_Fields
This will be more efficient, too.

Regards,
Gora

Reply via email to