Few thoughts: 1) If you place the script transformer method on the entity named "x" and then pass the ${topic_tree.topic_id} to that as an argument, then shouldn't you have everything you need to work with x's row? Even if you can't look up at the parent, all you needed to know was the topic_id and based on that you can edit or not edit x's row ... shouldn't that be sufficient to get you what you need to do?
2) Regarding the manner in which you are trying to use the following xpath syntax: forEach="/gvpVideoMetaData/mediaItem[@media_id='${topic_tree.topic_id}']" There are two other closely related thread that I've come across: (a) http://lucene.472066.n3.nabble.com/DIH-Enhance-XPathRecordReader-to-deal-with-body-FLATTEN-true-and-body-h1-td2799005.html (b) http://lucene.472066.n3.nabble.com/using-DIH-with-mets-alto-file-sets-td1926642.html They both seemed to want to use the full power of XPath like you do and I think that in a roundabout way they were told utilize the xsl attribute to make up for what the XPath was lacking by default. Here are some choice words by Lance that I've extracted out for you: ==== "XPathEntityProcessor parses a very limited XPath syntax. However, you can add an XSL script as an attribute, and this somehow gets called instead." ==== - Lance ==== There is an option somewhere to use the full XML DOM implementation for using xpaths. The purpose of the XPathEP is to be as simple and dumb as possible and handle most cases: RSS feeds and other open standards. Search for xsl(optional) http://wiki.apache.org/solr/DataImportHandler#Configuration_in_data-config.xml-1 ==== - Lance I hope you can make some sense of this, I'm no expert, but just thought I'd offer my 2 cts. On Fri, Sep 23, 2011 at 9:21 AM, abhayd <ajdabhol...@hotmail.com> wrote: > hi > I am not getting exception anymore.. I had issue with database > > But now real problem i always have ... > Now that i can fetch ID's from database how would i fetch correcponding data > from ID in xm file > > So after getting DB info from jdbcsource I use xpath processor like this, > but it does not work. > <entity name="f" processor="FileListEntityProcessor" > baseDir="${solr.solr.home}" fileName=".xml" > recursive="false" rootEntity="true" > dataSource="video_datasource"> > <entity name="x" processor="XPathEntityProcessor" > > forEach="/gvpVideoMetaData/mediaItem[@media_id='${topic_tree.topic_id}']" > url="${f.fileAbsolutePath}" > > > > I even tried using script transformer but "row" in script transformer has > scope limited to entity "f" If this is nested under another entity u cant > access top level variables with "row" . > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/DIH-error-when-nested-db-datasource-and-file-data-source-tp3345664p3362007.html > Sent from the Solr - User mailing list archive at Nabble.com. >