Instead of continuing to work with the sample data that comes with Solr, we're going to use a large database of music metadata from the MusicBrainz project at http://musicbrainz.org. The data is free and is submitted by a large community of users. One way MusicBrainz offers this data is in the form of a large SQL file for import into a PostgreSQL database. In order to make it easier for you to play with this data, the online code supplement to this book includes the data in formats that can readily be imported into Solr. Alternatively, if you already have your own data, then we recommend starting with that, using this book as a guide.
The MusicBrainz database is highly relational. Therefore, it will serve as an excellent instructional dataset to discuss Solr schema choices. The MusicBrainz database schema is quite complex, and it would be a distraction to go over even half of it. We are going to use a subset of it and express it in a way that has a straightforward mapping...