Extending the solrconfig.xml file
The solrconfig.xml file defines Solr properties with default values.
The default file can be extended using the jvm.options file, by using
XInclude, or by configuring the SRCHCONFEXT table. The most common customization
of the Solr configuration file is defining new values for replication and caching.
Procedure
Option 1
Follow instructions in the topic Tuning Just-In-Time compilers to add search server JVM arguments to the jvm.options file in the Search server.
Note: You cannot directly modify or extend the solrconfig.xml file. Instead,
you can customize the jvm.options file to extend it, or use the procedure
described here. The jvm.options file is a Java properties file that contains a
series of key/value pairs. Each key/value pair is written on its own line. Values are assigned to
the key using the equal ("=") sign. Prefix each key/value pair with
-D
. For
instance, -Dsolr.mergeFactor=100
assigns the value 100 to the key
solr.mergeFactor.Option 2
You can use the standard XML feature XInclude to include the contents of a
local file. The solrconfig.xml file includes an <xi:include
xmlns:xi="http://www.w3.org/2001/XInclude">
element, which looks for the file
x-solrconfig.xml and includes its contents if it is found.
Your search-config-ext project contains the file
x-solrconfig.xml. Add your own content to this file. The template file includes
some sample configurations that you can uncomment or further modify for your own
use.
Note: XIinclude works only if x-solrconfig.xml is a
self-contained XML object with a single root element. You cannot use variables (such as
${solr.data.dir:}
) in this extension file.Option 3