[
https://issues.apache.org/jira/browse/SOLR-1033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12675902#action_12675902
]
Fergus McMenemie commented on SOLR-1033:
----------------------------------------
Not sure I am following what you say. If I number the different steps in my
example entity as follows:-
{code}
<entity name="x" .... transformer="TemplateTransformer,RegexTransformer">
1 <field column="fileWebPath" template="${jc.fileAbsolutePath}"
regex="${dataimporter.request.contentdir}(.*)" replaceWith="/ford$1" />
2 <field column="vurl" xpath="/record/mediaBlock/mediaObject/@vurl"
/>
3 <field column="imagetype"
xpath="/record/mediaBlock/mediaObject/@imageType" regex="^(\w).*"/>
4 <field column="imgWebPathICON" regex="(.*)/.*"
replaceWith="$1/imagery/s${x.vurl}.jpg" sourceColName="fileWebPath"/>
5 <field column="imgWebPathFULL" regex="(.*)/.*"
replaceWith="$1/imagery/${x.imagetype}${x.vurl}.jpg"
sourceColName="fileWebPath"/>
{code}
We see that column 5 involves a regex which in turn involves columns 3 and 2.
Column 3 is itself a regex. We therefore have the output from one regex being
used within another regex. So as far as I can see we need the fix made to both
the TemplateTransformer and the RegexTransformer.
> DIH transformers cannot reuse output from previous transformations
> ------------------------------------------------------------------
>
> Key: SOLR-1033
> URL: https://issues.apache.org/jira/browse/SOLR-1033
> Project: Solr
> Issue Type: Improvement
> Components: contrib - DataImportHandler
> Affects Versions: 1.4
> Environment: All operating systems and software platforms
> Reporter: Fergus McMenemie
> Fix For: 1.4
>
> Attachments: SOLR-1033.patch, SOLR-1033.patch
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> It can be very useful to reuse the output from a DIH template in other
> templates and or regex transformers. Currently this cannot be done. The
> resolver is initialized at the start of the transformer run with what ever
> values exist for a column name at that instant. As the transformer executes
> it may define new values for column names. My change is intended to update
> the hash used by the resolver after each successful transformation.
> This only applies to the template and regex transformers.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.