lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nishi <>
Subject Re: Multiple structured datasource(rss,db,xml) in single schema.xml
Date Thu, 13 Sep 2012 20:18:41 GMT
Thanks Thomas. Appreciate your comments.
These are my configurations :
1)  solrconfig.xml

  <requestHandler name="/fw_dataimport"
    <lst name="defaults">
                <str name="config">innovation-data-config.xml</str>  
  <requestHandler name="/db_dataimport"
    <lst name="defaults">
                <str name="config">db-data-config.xml</str>  

2) db-data-config.xml

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

3) innovation-data-config.xml
<dataSource type="HttpDataSource" />
 <entity name="Innovation"
   <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" /> 

4) schema.xml

  <!—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" />  
  <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...

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,

View this message in context:
Sent from the Solr - User mailing list archive at

View raw message