i'm using apache solr version 6.4.1 on windows 10 .i want to load data from mysql database into solr core but it does not works. here is the scenario : there is a core named ako in directory \solr-6.4.1\solr-6.4.1\server\solr and files solrconfig.xml & db-data-config.xml in directory \solr-6.4.1\solr-6.4.1\server\solr\ako\conf . i added needed lines of code to solrconfig.xml as below :
<requestHandler name="/dataimport" class="solr.DataImportHandler">
<lst name="defaults">
<str name="config">db-data-config.xml</str>
</lst>
</requestHandler>
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-dataimporthandler-6.4.1.jar" />
<lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-dataimporthandler-extras-6.4.1.jar" />
<lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />
and below is content of file db-data-config.xml:
<dataConfig>
<dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/meeva" user="root" password=""/>
<document>
<entity name="businesses" query="select id, title from businesses">
<field column="id" name="biz_id" />
<field column="title" name="biz_title" />
</entity>
</document>
</dataConfig>
i added scema.xml file with this below content , but still does not work:
<field name="biz_id" type="int" indexed="true" stored="true" required="true" multiValued="false" />
<field name="biz_title" type="string" indexed="true" stored="true"/>
but when importing data from solr admin page ( go to http://localhost:8983/solr/#/ako/dataimport//dataimport?command=full-import) it returns Requests: 0 , Fetched: 0 , Skipped: 0 , Processed: 0 and nothing is added to core.can anyone help please?