When Solr starts, the very first thing it does is determine where the Solr home directory is. Chapter 8, Deployment covers the various ways to tell Solr where it is, but by default it's the directory named simply solr relative to the current working directory where Solr is started. You will usually see a solr.xml file in the home directory, which is optional but recommended. It mainly lists Solr cores. For simpler configurations like example/solr, there is just one Solr core, which uses Solr's home directory as its core instance directory. A Solr core holds one Lucene index and the supporting Solr configuration for that index. Nearly all interactions with Solr are targeted at a specific core. If you want to index different types of data separately or shard a large index into multiple ones then Solr can host multiple Solr
cores on the same Java server. Chapter 8, Deployment has further details on multi-core configuration.
A Solr core's instance directory is laid out like this:
• conf: Configuration files. The two I mention below are very important, but it will also contain some other .txt and .xml files which are referenced by these two.
• conf/schema.xml: The schema for the index including field type definitions with associated analyzer chains.
• conf/solrconfig.xml: The primary Solr configuration file.
• conf/xslt: Various XSLT files that can be used to transform Solr's XML query responses into formats such as Atom and RSS. See Chapter 9, Integrating Solr.
• conf/velocity: HTML templates and related web assets for rapid UI prototyping using Solritas, covered in Chapter 9, Integrating Solr. The soon to be discussed "browse" UI is implemented with these templates.
• data: Where Lucene's index data lives. It's binary data, so you won't be doing anything with it except perhaps deleting it occasionally to start anew.
• lib: Where extra Java JAR files can be placed that Solr will load on startup. This is a good place to put contrib JAR files, and their dependencies.