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 "DataImportHandler" by ShalinMangar
Date Sun, 30 Mar 2008 16:22:17 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 ShalinMangar:
http://wiki.apache.org/solr/DataImportHandler

The comment on the change is:
Updated instructions for db example

------------------------------------------------------------------------------
  
  This is a relational model of the same schema that SOLR currently ships with. We will use
this as an example to build a data-config.xml for DataImportHandler. We've created a sample
database with this schema in HSQLDB.  To run it, do the following steps:
  
-  1. Download [http://wiki.apache.org/solr-data/attachments/DataImportHandler/attachments/example-database.zip
example-database.zip] to execute this example. This zip file contains all the hsqldb related
files. Extract the downloaded zip file into c:\temp.
+  1. Download attachment:example-solr-home.jar and use ''jar -xvf example-solr-home.jar''
to extract it to your local drive. This jar file contains a complete solr home with all the
configuration you need to execute this as well as the RSS example (given later in this page).
It also contains an example hsqldb schema (in hsqldb folder)
-  2. Download attachment:example-solr-home.jar and use ''jar -xvf example-solr-home.jar''
to extract it to your local drive. This jar file contains a complete solr home with all the
configuration you need to execute this example. In the example-solr-home, there is a ''solr.war''.
Copy this war file to your tomcat/jetty webapps folder. In addition to the [http://issues.apache.org/jira/browse/SOLR-469
SOLR-469] patch, it also contains the JDBC driver for hsqldb needed to execute this example.
If you want to deploy it with your existing solr installation, just drop in the 'dataimport.jar'
(find it in the jar) to WEB-INF/lib of your deployed webapp.
+  2. In the example-solr-home, there is a ''solr.war''. Copy this war file to your tomcat/jetty
webapps folder. In addition to the [http://issues.apache.org/jira/browse/SOLR-469 SOLR-469]
patch, this war file also contains the JDBC driver for hsqldb needed to execute this example.
If you want to deploy it with your existing solr installation, just drop in the 'dataimport.jar'
(find it in the jar) to WEB-INF/lib of your deployed SOLR webapp.
   3. Use the ''solr'' folder inside ''example-data-config'' folder as your solr home.
   4. Hit [http://localhost:8983/solr/dataimport] with a browser to verify the configuration.
   5. Hit [http://localhost:8983/solr/dataimport?command=full-import] to do a full import.
  
+ The ''solr'' folder given in the above jar is a MultiCore SOLR home. It has two cores, one
for the DB example (this one) and one for an RSS example (new feature).
  
   * The data-config.xml used for this example is:
  
@@ -159, +160 @@

  {{{
  <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
       <lst name="defaults">
-        <str name="config">c:/temp/example-data-config.xml</str>
+        <str name="config">db-data-config.xml</str>
         <lst name="datasource">
           <str name="driver">org.hsqldb.jdbcDriver</str>
-          <str name="url">jdbc:hsqldb:/temp/example/ex</str>
+          <str name="url">jdbc:hsqldb:./hsqldb/ex</str>
           <str name="user">sa</str>
           <str name="password"></str>
         </lst>

Mime
View raw message