githubEdit

Data Import Handler (DIH)

Configure Solr to use the Data Import Handler (DIH) for importing data from an SQL database

  1. Navigate to the directory:

cd /opt/solr/server/solr/mycore/conf
  • If you don't have this directory:

2. Modify the solrconfig.xml file:

  1. Now, data-config.xml for MySQL:

  1. Run the dataimport:

  • After configuring DIH on solr, we can initiate the data import process by sending an HTTP request to Solr using the given command/ query:

  1. Check Import Status:

  • We can check the import status by visiting Solr's Admin UI or querying the status using curl:

Points to be remember:

  • Remember to ensure that your Solr server and SQL database are accessible.

  • Handle sensitive information e.g database credentials securely.

Last updated