Installing Apache Solr
This page describes how to install and start Apache Solr and create a new Solr core based on a Magnolia configuration set.
Apache Solr is a standalone enterprise-grade search platform needed together with the Magnolia Solr module for high-performance searches of a large document set.
The installation procedure for Apache Solr described on this page is reduced to a minimum of steps required to set up, start, and use Solr with a Magnolia instance.
| For a full account, please refer to the official Solr documentation at solr.apache.org/guide/. |
Getting Apache Solr
Download Apache Solr and extract the zip to your computer.
Creating a configuration set
Create a new Magnolia configuration set by duplicating the $SOLR_HOME/server/solr/configsets/_default folder and then naming it as magnolia_data_driven_schema_configs.
In this new configuration set, you need to create or modify two files, solrconfig.xml and managed-schema:
-
solrconfig.xml, a configuration file with the most parameters affecting Solr itself. -
managed-schema, a file that specifies:-
which fields the Magnolia content can contain,
-
how those fields are added to the index,
-
how they are queried.
-
| For further details, see https://solr.apache.org/guide/solr/latest/configuration-guide/configuration-files.html. |
Configuration example
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 9.7.0 and tested against version 6.3.2 of the Magnolia Solr module.
|
-
Download the following example configuration files (based on the Solr data_driven_schema_configs Config sets).
-
Use them to replace the default files in the newly created
magnolia_data_driven_schema_configs/confdet:
The configuration files are managed in the Solr search provider module git repository.
Creating a new core
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 magnolia:
./solr create_core -c magnolia -d magnolia_data_driven_schema_configs
Use the admin dashboard
By opening http://localhost:8983/solr/, you may use Solr’s admin dashboard. From there, you can also create cores.
| The type of installation described above works for testing and development purposes. For production installation, see Taking Solr to Production (Solr latest). |