Reputation: 236
I am trying to configure SOLR on Debian with mysql import.
Solr is running and I can visit admin area on http://localhost:8983/solr/ however I am unable to dataimport under my selected core - it reports "Sorry, no dataimport-handler defined!"
It doesn't report any errors (I get reverse dns lookup warnings since running on test machine) and I was able to successfully import mysql via api following this guide http://solr.pl/en/2010/10/11/data-import-handler-%E2%80%93-how-to-import-data-from-sql-databases-part-1/
Any ideas would highly appreciated!
My config is as follows:
<dataConfig>
<dataSource type="JdbcDataSource"
driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/mydatabase?zeroDateTimeBehavior=convertToNull"
user="root"
password=""/>
<document name='tests'>
<entity name='posts'
query='select * from blog_posts'>
<field column="ID" name="id" />
<field column="TITLE" name="title" />
</entity>
</document>
</dataConfig>
schema.xml default chema with added:
<field name="id" type="string" indexed="true" required="true" stored="true" />
<field name="title" type="string" indexed="true" required="true" stored="true" />
solrconfig.xml default config with added
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-dataimporthandler-\d.*\.jar" />
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-dataimporthandler-extras-\d.*\.jar" />
<lib dir="${solr.install.dir:../../../..}/contrib/" regex="mysql-connector-java-.*\.jar" />
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">/opt/solr-6.4.0/server/solr/gradim/conf/mysql-gradim.xml</str>
</lst>
</requestHandler>
Upvotes: 0
Views: 1450
Reputation: 9789
It is a bug specifically in Solr 6.4, which will be fixed in Solr 6.4.1. The issue reference is SOLR-10035 and the comments contain a quick workaround you can apply immediately.
Upvotes: 1