Search configuration properties in the Solr configuration file (solrconfig.xml)
The solrconfig.xml controls how Solr behaves by mapping requests to different handlers. One index can be represented as one core. To use multiple indexes, for example, a book of recipes and a book of countries, these different indexes or books represent different cores. The solrconfig.xml contains most of the parameters for configuring Solr. It defines how search requests are managed, and how to manipulate data for the user. The Solr configuration file is stored in the following location:
- /opt/WebSphere/Liberty/usr/servers/default/resources/search/index/managed-solr/config/v3/indextype/conf/solrconfig.xml
Solr exposes various components as services. These components are managed with the following RequestHandler components:
- Query handler
- A handler that is implicitly mapped to the /select path, unless another name is explicitly used instead.
- Replication handler
- A handler that is mapped to the /replication path. This handler controls index replication between the master and subordinate servers.
- Data import handler
- A handler that is mapped to the /dataimport path. It is used to load structured content using the Data Import Handler (DIH). It handles both full and incremental (delta) imports.
Configurable properties for search
In the Solr configuration file, the search properties are grouped into sections. For each property, we can read a description, and examples for some of the more complex properties. The following table summarizes the types of configurable properties in the files. Refer to the comments within the file for more details.Note: We cannot directly modify or extend Solr configuration files, such as the schema.xml, solrconfig.xml, or wc-data-config.xml files. Instead, we can work with customizable files to extend Solr configuration files:
- The schema.xml file can be extended using the x-schema.xml file.
- The solrconfig.xml file can be extended by editing the jvm.options file or by configuring the SRCHCONFEXT database table.
- The wc-data-config.xml file can be extended using a combination of the solrcore.properties and x-data-config.xml files, depending on the scope of the customization.
Configurable properties for managed search templates
We can override the default values in the solrconfig.xml file in two ways.
- By adding or changing search server JVM arguments in the jvm.options file in the Search server. For instructions on customizing jvm.options, see Tuning Just-In-Time compilers.
- by changing the relevant values in the SRCHCONFEXT database table. The values in SRCHCONFEXT will override the default settings in the solrconfig.xml file. See Extending the solrconfig.xml file.
Search property Purpose of property Update processor chain Contains properties for the update processor chain
- wc-conditionalCopyFieldChain
- When enabled, it copies the source fields into the target field if the conditions are met. The target field is tokenized with the store and catalog. For example, it creates store and catalog-specific spell check columns to be used by the term component.
Managed search templates Contains properties for the managed search templates.
- solr.ramBufferSizeMB
- Sets the amount of memory that can be used by Lucene indexing for buffering added documents and deletions before they are flushed to the directory.
- solr.mergeFactor
- Controls how many segments get merged at a time. For TieredMergePolicy, mergeFactor is a convenience parameter that sets both MaxMergeAtOnce and SegmentsPerTier at the same time. For LogByteSizeMergePolicy, mergeFactor decides how many new segments are allowed before they are merged into one.
- solr.filterCache.size
- The maximum number of entries in the filter cache
- solr.filterCache.initialSize
- The initial number of entries in the filter cache.
- solr.filterCache.autowarmCount
- The number of entries to prepopulate from the old cache.
- solr.queryResultCache.size
- The initial number of document objects to cache.
- solr.queryResultCache.initialSize
- The initial number of search results to cache.
- solr.queryResultCache.autowarmCount
- The number of search results to prepopulate from the old cache.
- solr.documentCache.size
- The maximum number of document objects to cache.
- solr.documentCache.initialSize
- The maximum number of document objects to cache.
- solr.documentCache.autowarmCount
- The number of document objects to prepopulate from the old cache.
- solr.queryResultWindowSize
- An optimization for use with the queryResultCache. When a search is requested, a superset of the requested number of document IDs are collected.
For example, if a search for a particular query requests matching documents 10 - 19, and queryWindowSize is 50, then documents 0 - 49 are collected. Any further requests in that range can be retrieved from the cache.
- solr.queryResultMaxDocsCached
- The maximum number of documents to cache for any entry in the queryResultCache.
- solr.maxWarmingSearchers
- The maximum number of searchers that might be concurrently warming in the background. An error is returned if this limit is exceeded.
Recommended: Set a master or repeater to 1 or 2, when the server is dedicated for indexing and not designed to handle live traffic.
While not recommended, if the master or repeater is used for both indexing and handling live traffic, set the value higher.
Set subordinates to 1 or 2.
- solr.maxBooleanClauses
- The maximum number of clauses in each BooleanQuery. An exception is thrown if this limit is exceeded.
Warning: This option modifies a global Lucene property that affects all Solr cores. If multiple solrconfig.xml files contain different values for this property, the last Solr core value to be initialized is used.
Related tasks
Extending the solrconfig.xml file