solr4 - How do you use the Solr DIH to select XML based on descriptive values? -
the xml has descriptive fields , use them select specific fields. there way data import handler pick "text block a" , "text block b" using "code=34089-3" key? code field has no data unique type of information want pick. when use xpath="/document/component/section/text/paragraph" end text blocks a, b, c , d. ideally able pick text block a. possible?
<component> <section> <id root="f915965e-fe3b-44eb-a2ed-c11f807e7f23"/> <code code="34089-3"/> <title>title a</title> <text> <paragraph>text block a</paragraph> <paragraph>text block b</paragraph> </text> </section> </component> <component> <section> <id root="80b7e2f1-f49f-4309-a340-210536705d4a"/> <code code="34090-1"/> <title>title b</title> <text> <paragraph>text block c</paragraph> <paragraph>text block d</paragraph> </text> </section> </component> <entity name="iupac" processor="xpathentityprocessor" foreach="/document" url="${f.fileabsolutepath}"> <field column="chemical_name" xpath="/document/component/section/code[@code='34089-3']/access below values???" /> </entity>
try that:
/document/component/section[code/@code='34089-3']/text/paragraph
Comments
Post a Comment