Configuring solrconfig.xml

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, either directly or via the Config API to create "configuration overlays" (configoverlay.json) to override the values in solrconfig.xml.

In solrconfig.xml, you configure important features such as:

  • request handlers, which process the requests to Solr, such as requests to add documents to the index or requests to return results for a query

  • 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 when not running in SolrCloud mode

The solrconfig.xml file is located in the conf/ directory for each collection. Several well-commented example files can be found in the server/solr/configsets/ directories demonstrating best practices for many different types of installations.

Some solrconfig.xml aspects are documented in other sections. See lib directives in SolrConfig, which can be used for both Plugins and Resources.

Index Location and Format: Where and how Solr’s indexes are stored.

Index Segments and Merging: Lucene index writers, including segment management, merges, and locks.

Schema Factory Configuration: Schema file formats.

Commits and Transaction Logs: Update requests and commit settings.

Caches and Query Warming: Caches, query warming, and query listeners.

Request Handlers and Search Components: Request processors and handlers for search features.

Implicit Request Handlers: Request end-points automatically provided by Solr.

RealTime Get: Get the latest version of a document without opening a searcher.

InitParams: Default parameters for request handlers.

RequestDispatcher: Advanced request parsing and HTTP cache headers.

Update Request Processors: Plugins for update requests.

Script Update Processor: Java scripting engines during document updates.

Codec Factory: Lucene codecs when writing data to disk.