App configuration with Solr

The Solr Workbench submodule of the Magnolia Solr module provides a Magnolia Solr container that can be used instead of the JCR container for list, search and thumbnail views in a content app. This page describes how to configure the submodule to use Solr’s functionality in the Magnolia Assets subapp and for indexing of the assets it manages.

The Solr container, which fetches data indexed in the Apache Solr search platform, is recommended to be used when handling large numbers of assets.

A note about search containers

Magnolia uses the following search containers that backup the search view in the UI:

  • for Jackrabbit.

  • for Solr.

    In general you can use these containers in any JCR based Content App. Similarly, indexing is workspace-based and hence one workspace may use Jackrabbit’s indexing functionality, another one Solr’s indexing functionality.

    You can also define and use your own custom container, especially in case you need to use both Jackrabbit and Solr together in one workspace.

Installing Solr

To install Solr follow the instructions on the Installing Apache Solr page.

Creating a dedicated core for the DAM app

With Apache Solr running create a new core called dam_wokbench for the Magnolia Assets subapp:

./solr create_core -c dam_workbench -d magnolia_data_driven_schema_configs

DAM workspace indexers

The Solr Wokbench module comes with two preconfigured DAM workspace indexers:

  • damWorkbenchAssets

  • damWorkbenchFolders

To enable them, set to true the following properties:

  • /modules/content-indexer/config/indexers/damWorkbenchAssets@enabled

  • /modules/content-indexer/config/indexers/damWorkbenchFolders@enabled

For more information about configuring indexers see Indexer configuration.

You can see the preconfigured configuration by clicking the following links:



DAM app configuration

Content connector

The Solr Workbench module introduces which allows you to specify which client should be used.

The configuration snippet below shows how to use SolrJcrContentConnectorDefinition in the DAM app:


client: dam_workbench

The definition by YAML is a decoration.

For more about content connectors, see Content connector configuration.

Content View

The submodule provides presenter and definition classes for list, search and thumbnail views. The configuration snippet below shows SOLR-based content view definitions for the list, thumbnail and search views in the DAM app’s browser:



The above definition by YAML is a decoration.

For more information about configuring content view definitions, see Content view definition configuration.

dam-solr-workbench light module

To use the Solr Workbench submodule in the DAM app, you can get a pre-configured light module from git: dam-solr-workbench.