I specified template in a field

            <field column="incident_id" name="object_id"
template="inc-${incident.incident_id}" />

When doing full import, for each row retrieved from oracle, there is this
output in the console:

May 03, 2012 3:47:08 PM
org.apache.solr.handler.dataimport.TemplateTransformer transformRow

WARNING: Unable to resolve variable: incident.incident_id while parsing
expression: inc-${incident.incident_id}


Below is the data-config.xml file where the template is defined:


<dataConfig>



    <dataSource name="jdbc" driver="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@//dbtest:1521/ORCL" user="user" password="xxx"/>





    <document>

        <entity name="incident"

          transformer="TemplateTransformer"

          query="select incident_id, ('inc-' || incident_id ) unique_id,
long_desc from incident"

          deltaQuery="select incident_id from incident where last_update
&gt; TO_DATE('${dataimporter.last_index_time}','YYYY-MM-DD HH24:MI:SS') "

          >



            <field column="incident_id" name="incident_id"/>

            <field column="incident_id" name="object_id"
template="inc-${incident.incident_id}" />

            <field column="unique_id" name="unique_id" />

            <field column="long_desc" name="long_desc" />

        </entity>

    </document>

</dataConfig>




Have tried to change the template to


template="inc-${incident_id}"


Still no luck, similar error.


Don't know what the TemplateTransformer is looking for to match the
variable.


Thanks,

RTI QA

Reply via email to