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 Umang Agrawal <um...@gmail.com> on 2014/11/28 17:43:08 UTC

Solr 4.10.2 - DataImportHandler - Qustion

Hi All

I have a question on loading data into Solr using DataImportHandler.

I have a xml file which I need to load into Solr using data import handler
via Xpath transformer:

XML file structure is:

*<record>*
* <item>*
* <tags>*
* <tag1>*
* <tag>*
* <id>01</id>*
* <value>value01</value>*
* </tag>*
* <tag>*
* <id>02</id>*
* <value>value02</value>*
* </tag>*
* <tag1>*
* <tag2>*
* <tag>*
* <id>03</id>*
* <value>value03</value>*
* </tag> *
* <tag2>*
* <tag3>*
* <tag>*
* <id>04</id>*
* <value>value04</value>*
* </tag>*
* <tag>*
* <id>05</id>*
* <value>value05</value>*
* </tag>*
* <tag>*
* <id>06</id>*
* <value>value06</value>*
* </tag> *
* <tag3> *
* </tags>*
* </item>*
*</record> *


I can use */record/item/tags//tag/id *to load the data in a multivalue
field but I need to maintain the relationship of id with value, I mean I
need a way, so that at query time I can get the value related to id.


Please advice. Thanks in advance.

-- 
Thanx & Regards
Umang Agrawal