- Support Solr 9.0 or later
- Alternative solr DIH (deprecated in Solr 9.0)
- Support DB
- mariadb
- oracle
- mssql
- mysql
- postgresql
- h2
- JDK 11 or later
-
download solr-db-importer-1.5.jar
java -jar solr-db-importer-1.5.jar # created examples
-
modify db-import.xml
<conf> <driver>org.mariadb.jdbc.Driver</driver> <jdbcUrl>jdbc:mariadb://localhost:3306/dbname</jdbcUrl> <username>username</username> <password>password</password> <bulkExecuteRowCount>1000</bulkExecuteRowCount> <solrSchemaUrl>http://localhost:8983/solr/schema_name</solrSchemaUrl> <select><![CDATA[ SELECT text_sn as id, title as subject, reg_dt FROM test_table WHERE text_sn > 0 ]]></select> </conf>
-
execute again
java -jar solr-db-importer-1.5.jar path/to/db-import.xml
gradlew jar
- build/libs/solr-db-importer-{version}.jar