Let's finally explore a Solr schema.
Before we continue, find a schema.xml
file to follow along. This file belongs in the conf
directory for a Solr Core instance configuration. For simple single-core Solr setups, this is the same as a Solr home directory. We suggest looking at configsets/mbtype/conf/schema.xml
in the example code distributed with the book, available online. If you are working off of the Solr distribution, you'll find it in example/solr/collection1/conf/schema.xml
. The example schema.xml
is loaded with useful field types, documentation, and field definitions used for the sample data that comes with Solr.
Tip
We prefer to initialize a Solr configuration by copying the example Solr home directory and liberally modifying it as needed, ripping out or commenting what we don't need (which is often a lot). This is half way between starting with nothing, or starting with the example and making essential modifications. If you do start with Solr's example configuration...