lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "DIHQuickStart" by NoblePaul
Date Wed, 08 Jul 2009 07:03:10 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The following page has been changed by NoblePaul:
http://wiki.apache.org/solr/DIHQuickStart

------------------------------------------------------------------------------
  </dataConfig>
  }}}
  
- ensure that your solr schema has the fields 'id' , 'name' , 'desc' . Change the appropriate
details in the dataconfig.xml
+ ensure that your solr schema (schema.xml) has the fields 'id' , 'name' , 'desc' . Change
the appropriate details in the dataconfig.xml
  
  Step 3 : Run the command http://solr-host:port/dataimpor?command=full-import
  
+ == Index the fields in different names ==
+ Step: 1Change the data-config as follows : 
+ {{{
+ <dataConfig>
+   <dataSource type="JdbcDataSource" 
+               driver="com.mysql.jdbc.Driver"
+               url="jdbc:mysql://localhost/dbname" 
+               user="user-name" 
+               password="password"/>
+   <document>
+     <entity name="id" 
+             query="select id,name,desc from mytable">
+        <field column="id" name="solr_id"/>
+        <field column="name" name="solr_name"/>
+        <field column="desc" name="solr_desc"/>
+     </entity>
+   </document>
+ </dataConfig>
+ }}}
+ Step 2 : This time the fields will be writtten to the solr fields 'solr_id' , 'solr_name'
, solr_desc' . You must have these fields in the schema.xml.
+ Step 3 : Run the command http://solr-host:port/dataimpor?command=full-import
  
- 

Mime
View raw message