I have updated the db-data-config.xml to introduce the templateTransformer
and generate a common field (docId) with other data-config files.

db-data-config.xml :
<dataConfig>
<dataSource driver="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:...." user="username" password="mypassword" />
<document>
<entity name="country" pk="docID" query="SELECT * FROM country"
transformer="TemplateTransformer">        
<field column="country_id" name="country_id" />
<field column="country_name" name="country_name" />
<field column="docID" template="C_${country.country_id}"/>
</entity>
</document>
</dataConfig>

schema.xml:

<fields>
    
   <field name="country_id" type="string" indexed="true" stored="true"  /> 
   <field name="country_name" type="string_wildcard" indexed="true"
stored="true" omitNorms="true"/>

    <field name="I_AssetID"   type="string" indexed="true" stored="true" />     
    <field name="I_Definition"  type="string" indexed="true" stored="true" 
/>      
    <field name="I_Title"  type="string" indexed="true" stored="true"  />  
    <field name="I_Description"  type="string" stored="true"  />  
    <field name="I_Body"  type="string"  stored="true"  />  
    <field name="I_ThumbnailImage_Asset"  type="string" stored="true" />  
    <field name="I_LargeImage_Asset"  type="string"  stored="true"  />  
   <field name="I_URL"  type="string" stored="true"  />

   <field name="docID"  type="string" indexed="true" stored="true"  />          
                

</fields>
 <!-- 
 <uniqueKey>docID</uniqueKey>
 <defaultSearchField>country_name</defaultSearchField>
 <solrQueryParser defaultOperator="OR"/>


But no luck yet, as the uniqueKey is not generated and complaining docID
required field is missing....so basically the docID is not created from the
data config configuration. Please give me some pointer why its not
working....FYI- I am using solr 3.6.1.

Thanks in advance.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Multiple-structured-datasource-rss-db-xml-in-single-schema-xml-tp4007497p4008039.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to