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 Fergus McMenemie <fe...@twig.me.uk> on 2009/02/13 09:52:05 UTC
Re: Is this DIH entity forEach expression OK? ... yes
>Hello,
>
>I am having bother with forEach. I have XML source documents containing
>many embedded images within mediaBlock elements. Each image has a an
>associated caption. I want to implement a separate image search function
>which searches the captions and brings back the associated image.
>
> <entity name="x"
> dataSource="myfilereader"
> processor="XPathEntityProcessor"
> url="${jc.fileAbsolutePath}"
> stream="false"
> forEach="/record | /record/mediaBlock"
> >
>
> <field column="vurl" xpath="/record/mediaBlock/mediaObject/@vurl" />
> <field column="imgCpation" xpath="/record/mediaBlock/caption" />
>
>Is is OK to have an xpath expression within forEach which is a child
>of another of the forEach xpath expressions?
>
Yes. It works fine, duplicate "uniqueKey"s were making it appear otherwise.
But....
--
===============================================================
Fergus McMenemie Email:fergus@twig.me.uk
Techmore Ltd Phone:(UK) 07721 376021
Unix/Mac/Intranets Analyst Programmer
===============================================================