lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "scott.chu" <>
Subject Re: trying DIH but get 'Sorry, no dataimport-handler defined!'
Date Tue, 24 May 2016 08:54:54 GMT

I try run the example by issuing "bin\solr create_core -c exampledih -d example\example-DIH\solr\db\conf".
It also shows same error. Do I issue wrong command?

2016/5/24 (週二)
----- Original Message ----- 
From: scott(自己) 
To: solr-user 
Date: 2016/5/24 (週二) 16:35
Subject: trying DIH but get 'Sorry, no dataimport-handler defined!'

I do following things: 

* I create folder : D:\solr-6.0.0\myconfigsets\testdih. 
* Copy D:\portable_sw\solr-6.0.0\example\example-DIH\solr\db\conf to D:\solr-6.0.0\myconfigsets\testdih.

* Go into D:\solr-6.0.0\myconfigsets\testdih\conf and edit db-data-config.xml as follows (I
am pretty sure mysql environment is ok): 

      <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/test"
user="hello" password="hellothere" /> 
      <document name="testdih"> 
          <entity name="testdih_data" query="select * from doctest"> 
              <field column="docid" name="id" /> 
              <field column="docdate" name="adate" /> 
              <field column="doctitle" name="atitle" /> 
              <field column="docbody" name="acontents" /> 

* Then I copy mysql-connector-java-5.0.8-bin.jar to D:\portable_sw\solr-6.0.0\server\solr-webapp\webapp\WEB-INF\lib.

* I check solrconfig.xml and see these relevant lines: 

    <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-dataimporthandler-.*\.jar"
      <requestHandler name="/dataimport" class="solr.DataImportHandler"> 
      <lst name="defaults"> 
        <str name="config">db-data-config.xml</str> 

* cd to D:solr-6.0.0, issue 'bin\solr start', it starts ok. 
* Issue 'bin\solr create_core -c testdih -d myconfigsets\testdih\conf' to create a core. It's
ok, too. 

* The solr.log has these log messages: 

    2016-05-24 15:59:24,781 INFO (coreLoadExecutor-6-thread-1) [ ] o.a.s.c.SolrResourceLoader
Adding 'file:/D:/portable_sw/solr-6.0.0/dist/solr-dataimporthandler-6.0.0.jar' to classloader

    2016-05-24 15:59:24,781 INFO (coreLoadExecutor-6-thread-1) [ ] o.a.s.c.SolrResourceLoader
Adding 'file:/D:/portable_sw/solr-6.0.0/dist/solr-dataimporthandler-extras-6.0.0.jar' to classloader

* So I think dih jars are loaded ok. 

I go to localhost:893 in browser and select core 'testdih', then click 'DataImport' item but
rightpane shows "Sorry, no dataimport-handler defined!". 

 What do I miss? 

2016/5/24 (週二) 

已透過 AVG 檢查 - 
版本: 2015.0.6201 / 病毒庫: 4568/12285 - 發佈日期: 05/23/16
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message