kratika sharma kratika sharma - 1 year ago 141
Apache Configuration Question

how to import and index data from database in solr 6.2.1(New to solr)

I am trying to index data from MySql,bt when execute it from solr admin, it only shows: Request:1, Fetched:0, Skipped:0

New to solr. Please help.

Answer Source

Take a look at your log, from the Solr Admin Panel, if there's any hint about the indexing process, at the url /solr/#/~logging if you see any error while trying to importing documents, clicking on the log line will give you additional information about the error.

Since you're mentioning Solr Admin I guess you're using the Data Import Handler.

Here is a very (very!) basic configuration, assuming you're indexing from mysql:

    <dataSource type="JdbcDataSource"
      <entity name="mydocuments" 
         query="select id, field1, field2, field3 from yourtable;">


When running the indexer, check these two checkboxes:

Commit: to execute a commit after the import

Auto-Refresh Status: to updated the import stats while it's running

Also, check if in your schema is defined a field version

<field name="_version_" type="long" indexed="true" stored="true" multiValued="false"/>

Please let me know if it helped.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download