The solrconfig.xml file is the configuration file with the most parameters affecting Solr itself. While configuring Solr, you'll work with solrconfig.xml often. The file comprises a series of XML statements that set configuration values. In solrconfig.xml, you configure important features such as:
- request handlers
- listeners (processes that "listen" for particular query-related events; listeners can be used to trigger the execution of special code, such as invoking some common queries to warm-up caches)
- the Request Dispatcher for managing HTTP communications
- the Admin Web interface
- parameters related to replication and duplication (these parameters are covered in detail in Legacy Scaling and Distribution)
The solrconfig.xml file is found in the solr/conf/ directory. The example file is well-commented, and includes information on best practices for most installations.
We've covered the options in the following sections:
- DataDir and DirectoryFactory in SolrConfig
- Lib Directives in SolrConfig
- IndexConfig in SolrConfig
- UpdateHandlers in SolrConfig
- Query Settings in SolrConfig
- RequestDispatcher in SolrConfig
- RequestHandlers and SearchComponents in SolrConfig
More Information
- The Solr Wiki has a comprehensive page on solrconfig.xml, at http://wiki.apache.org/solr/SolrConfigXml.
- 6 Sins of solrconfig.xml modifications from solr.pl.