Thanks Thomas. Appreciate your comments.
These are my configurations :
1)  solrconfig.xml

   
  <requestHandler name="/fw_dataimport"
class="org.apache.solr.handler.dataimport.DataImportHandler">
    <lst name="defaults">
                <str name="config">innovation-data-config.xml</str>  
    </lst>
  </requestHandler>  
   
  <requestHandler name="/db_dataimport"
class="org.apache.solr.handler.dataimport.DataImportHandler">
    <lst name="defaults">
                <str name="config">db-data-config.xml</str>  
    </lst>
  </requestHandler>

2) db-data-config.xml

<dataConfig>
<dataSource driver="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin...." user="username" password="mypassword" />
<document>
<entity name="country" pk="country_id"
  query="SELECT * FROM country">           
<field column="country_id" name="country_id" />
<field column="country_name" name="country_name" />
</entity>
</document>
</dataConfig>

3) innovation-data-config.xml
<dataConfig>
<dataSource type="HttpDataSource" />
<document>
 <entity name="Innovation"
                        pk="I_AssetID"
                        url="http://www.example.com/something.xml";
                        processor="XPathEntityProcessor"
                        forEach="/Innovation/name"
                        transformer="DateFormatTransformer">   
   <field column="I_AssetID" xpath="/Innovation/name/Innovation_AssetID" />     
                                                                                
      
   <field column="I_Definition" xpath="/Innovation/name/Definition" />
   <field column="I_Title"  xpath="/Innovation/name/Title" />     
   <field column="I_Description"  xpath="/Innovation/name/Description" /> 
   <field column="I_Body"  xpath="/Innovation/name/Body" /> 
   <field column="I_ThumbnailImage_Asset" 
xpath="/Innovation/name/ThumbnailImage_Asset" /> 
   <field column="I_LargeImage_Asset" 
xpath="/Innovation/name/LargeImage_Asset" /> 
   <field column="I_URL"  xpath="/Innovation/name/URL" /> 
   </entity>
 </document>
</dataConfig>


4) schema.xml

<fields>
  <!—db article fields-- >     
   <field name="country_id" type="string" indexed="true" stored="true"  /> 
   <field name="country_name" type="string_wildcard" indexed="true"
stored="true" omitNorms="true"/>

     <!—rss article fields-- >   
       <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"
required="true" />  
      <field name="I_Description"  type="string" stored="true"
required="true" />  
      <field name="I_Body"  type="string"  stored="true" required="true" />  
      <field name="I_ThumbnailImage_Asset"  type="string" stored="true"
required="true" />  
      <field name="I_LargeImage_Asset"  type="string"  stored="true"
required="true" />  
      <field name="I_URL"  type="string" stored="true" required="true" />  
</fields>
<uniqueKey>I_AssetID</uniqueKey> 
 <defaultSearchField>I_Title</defaultSearchField>
  <solrQueryParser defaultOperator="OR"/>


Now, its complaining when I run the "db_dataimport", that I_AssetID,etc is
required field ....
and when I run the  "fw_dataimport", its complaining for country_id is
required field and missing...

Requirement:
So when I run db_dataimport , I want it to take care of only the fields
related to db from schema.xml and similar for fw_dataimport.

-> Also how to make an uniquekey common for these two source which doesn't
have any common/related field at all.

Could you please let me know what are the changes needed to acheive this.
Thanks again,
Nish



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

Reply via email to