Installing Apache Solr
This page describes how to install and start Apache Solr 7 and create a new Solr core based on a Magnolia configuration set. Apache Solr is a standalone enterprise-grade search platform that’s needed together with the Magnolia Solr module for high-performance searches of large volumes of documents.
The installation procedure for Apache Solr described on this page has been reduced to just a minimum of steps required to setup, start and use Solr with a Magnolia instance. For a full account please refer to the official Solr documentation at solr.apache.org/guide/.
From version 5.2 the module supports Solr 7.x.
From version 5.0 it is compatible with Solr 5.x.
Older versions of the module are compatible with Solr 4.
Download Apache Solr and extract the zip to your computer.
This version contains changes in
<field name="jcrname" type="string" stored="true" indexed="true"/>).
<field name="nodetype" type="string" stored="true" indexed="true"/>).
<dynamicField name="asset_*" type="text_general" indexed="true" stored="true" multiValued="false"/>).
<copyField source="*" dest="text"/>(replaced by
solrconfig.xml, see also below).
*_point(in collision with the
*_pointfields when parsed by Apache Tika in documents).
*_id (Indonesian)(in collision with the
*_idfields when parsed by Apache Tika in documents).
By default only document content is indexed (into the
All fields that are not defined in the schema are ignored (
CloneFieldUpdateProcessorFactorywas added into the
add-unknown-fields-to-the-schemaupdate request processor chain. This replaces
<copyField source="*" dest="text"/>, which was removed from the
ignoredfields are by default excluded from copying to the
This version contains changes in
If you don’t plan to index same content by two different indexers or
crawlers then you don’t need to update your
managed-schema for your solr core. Only change what you need to do is
uniqueKeyField property with value
id into your solr sear result
It’s needed to recreate all Solr indexes, because of the changes in configuration files. Probably the easiest way to do it is recreate the solr core and then retrigger indexing in Magnolia.
managed-schemaconfiguration files for
$SOLR_HOME/server/solr/configsets/magnolia_data_driven_schema_configMagnolia config set.
magnoliacore an create it again
cd $SOLR_HOME/bin ./solr delete -c magnolia ./solr create_core -c magnolia -d magnolia_data_driven_schema_configs
Retrigger the indexers, by changing their property
Create a new Magnolia config set by duplicating the
$SOLR_HOME/server/solr/configsets/_default folder and name it to
In this new configuration set you need to create or modify two files,
solrconfig.xml, a configuration file with the most parameters affecting Solr itself.
managed-schema, a file that specifies what fields the Magnolia content can contain, how those fields are added to the index, and how they are queried.
For further details see https://solr.apache.org/guide/7_3/documents-fields-and-schema-design.html.
|Please be aware that different Solr versions may require different content in the Solr configuration files. The example configuration files attached below are for Solr 7.3.0.|
Download the following example configuration files (based on Solr
data_driven_schema_configs Config sets) and replace with them the default files in the newly created set
A core is a running instance of a Lucene index along with all the Solr
configuration required to use it. Create a new core called
./solr create_core -c magnolia -d magnolia_data_driven_schema_configs