The Solr DataImport Handler (DIH) is off across the whole Opensolr platform for security reasons. It is not gone: ask us and we enable it on your index.
01 · Why it is off
DIH pulls data from a source you set inside the index configuration. That makes it powerful and, on a shared platform, risky, so it is off by default everywhere.
02 · Have it enabled
Ask through the contact form or by email
Use the contact form or write to support@opensolr.com with the index name and what you import from.
Enabled per index
DIH is switched on for the indexes you name, not for the whole account or the whole server.
03 · Set it up
Once DIH is on, open the Configuration tab of your index and edit db-data-config.xml. It holds the database connection and the query that reads your rows:
<dataConfig> <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://YOUR_DB_HOST/YOUR_DB_NAME" user="your-username" password="your-password" /> <document> <entity name="id" query="SELECT id, name, description FROM your_table"> </entity> </document> </dataConfig>
Every column the query returns needs a field in schema.xml:
<field name="id" type="string" indexed="true" stored="true" required="true" /> <field name="name" type="text_general" indexed="true" stored="true" /> <field name="description" type="text_general" indexed="true" stored="true" />
Then run the import, with the username and password of your index:
curl -u USERNAME:PASSWORD "https://YOUR_SOLR_HOST/solr/YOUR_INDEX/dataimport?command=full-import"
04 · Solr versions
DIH was removed in Solr 9
On Solr 9 and later, send your data through the Solr API instead: JSON or XML to /update, a CSV file, or a client library such as SolrJ, Solarium or pysolr.
Solr below 8 is retired on 01/01/2027
Plan the move of indexes on older versions to a current Solr version: Regions.
The username and password of a new index: Default HTTP Auth Credentials.