Search Manual / Version 2404
Table Of Contents
Solr uses a directory called Solr Home for configuration files and
additional libraries. It is specified with parameter -s
of the "bin/solr start
" script
or as environment property SOLR_HOME
, for example, in bin/solr.in.sh
.
The directory has the following general structure:
<solr-home>/ solr.xml configsets/ <configset1>/ conf/ schema.xml solrconfig.xml ... <configset2>/ ... lib/ <additional jar files>
solr.xml
The file solr.xml
is the central Solr configuration file. It contains just a few settings, which you
do not need to change. Most of Solr's configuration is placed in other configuration files.
It specifies the coreRootDirectory
, which is the directory where
Solr cores and their data are stored. The default solr.xml
uses
the directory that is set with system property coreRootDirectory
. If no such system property is set,
Solr will store cores in the directory <solr-home>/cores
. It's recommended to configure
a different absolute path outside of Solr Home.
You can set the coreRootDirectory
system property with the parameter
"-a -DcoreRootDirectory=<path>
" when invoking "bin/solr start
".
Alternatively, you can set the environment variable
SOLR_OPTS
, for example in bin/solr.in.sh
:
SOLR_OPTS="$SOLR_OPTS -DcoreRootDirectory=/var/coremedia/solr-data"
You can find more information about the solr.xml
file in
Solr Reference Guide: Configuring solr.xml.
Config Sets
Index-specific configuration files are organized as named config sets, which are subdirectories of
the configsets
directory. A config set defines an index schema with index fields and types
in conf/schema.xml
and lots of configuration options for indexing, searching and additional
features in conf/solrconfig.xml
. The latter file for example contains search request handler
definitions with default settings such as the default index field to search in.
The CoreMedia Search Engine comes with
three config sets: "content
" for Content Feeder indices,
"cae
" for CAE Feeder indices and "elastic
" for
Elastic Social indices. They configure different index fields and
Solr features such as search request handlers as required. Projects may customize these files or create
additional config sets according to their needs. Note that some index fields are
required for operation. See the comments in the configuration files for details.
Lib directory
The directory <solr-home>/lib
contains additional libraries that can be used by all
Solr cores and are not available in the Solr distribution itself. This includes some required
CoreMedia extensions.
Core Root Directory
The coreRootDirectory
contains the actual Solr cores, which are the indices used by CoreMedia
applications. The directory must be writable and should provide fast disk I/O for good performance.
Solr automatically discovers cores by looking for core.properties
files below that
directory. Each directory with a core.properties
file represents a Solr Core.
CoreMedia Feeder applications create cores dynamically, so the directory can be empty at first start.
With the default configuration, Content Feeder and CAE Feeders will create these Solr cores when started the first time:
studio
: an index of CoreMedia contents used for searching in Studio, which gets its data from the Content Feeder.preview
: an index of CoreMedia content beans used for searching in the Content Application Engine of the Content Management Environment (aka preview), which gets its data from the CAE Preview Feeder.live
: an index of CoreMedia content beans used for searching in the Content Application Engine of the Content Delivery Environment (aka live), which gets its data from the CAE Live Feeder.
Further cores will be created by Elastic Social applications for users and comments for different tenants, for example:
blueprint_corporate-de-de_users
: an index of Elastic Social users for tenantcorporate-de-de
used for searching in the Studio , which gets its data from an Elastic Social Worker.blueprint_corporate-de-de_comments
: an index of Elastic Social comments for tenantcorporate-de-de
used for searching in the Studio , which gets its data from an Elastic Social Worker.
The coreRootDirectory
has the following general structure:
<coreRootDirectory>/ <core1>/ core.properties data/ index/ <index files> tlog/ <transaction log files> <core2>/ ...
The file core.properties
contains Solr core configuration properties, most importantly the
name of the used config set with the configSet
property. The core "studio
"
uses the "content
" config set, the cores "preview
" and "live
" use
the "cae
" config set, and Elastic Social cores use the
"elastic
" config set.
Index Data
Each Solr core has its own data
directory with index files and transaction log.
The actual index files are written to the directory data/index
.
In addition to the index, Solr maintains a transaction log with latest and/or pending changes for the index files.
The transaction log is stored in the directory data/tlog
.