Pulling data from the database with DIH (Intermediate)

Solr is not a database, even though some of the features introduced in Version 4 make it closer to one. Therefore, many production configurations involve having the master content stored in a database, and then copied into Solr and re-organized for faster searching.

DataImportHandler has strong support for importing data from the databases, both as a complete set and in incremental-delta mode.

Let's see how DIH makes importing data from a database easy.

Getting ready

We need to create a database first. We are going to use DerbyDB, which comes bundled with Java (and is called JavaDB), as the database is filesystem-based and also includes a built-in client. If your system does not have Derby installed, ...

Get Instant Apache Solr for Indexing Data How-to now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.