App configuration with Solr

This page describes legacy app configuration used together with the old Magnolia 5 UI.

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 5 UI Assets app 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.

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

  • info.magnolia.ui.workbench.search.SearchJcrContainer for Jackrabbit.

  • info.magnolia.search.solrsearchprovider.workbench.SolrContainer 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.

Creating a dedicated core for the Assets app

When Apache Solr is running, create a new core called dam_wokbench for the Assets app:

./solr create_core -c dam_workbench -d magnolia_data_driven_schema_configs

DAM workspace indexers

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

  • damWorkbenchAssets

  • damWorkbenchFolders

To enable them, set the following properties to true:

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

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

For more information about configuring indexers, see Indexer configuration.

The preconfigured configuration:

Node name Value

damWorkbenchAssets

     clients

         dam_wokbench

dam_wokbench

     fieldMappings

         caption

asset_caption

         contributor

asset_contributor

         copyright

asset_copyright

         coverage

asset_coverage

         description

asset_description

         extension

asset_extension

         fileName

asset_filename

         languages

asset_languages

         name

asset_name

         publisher

asset_publisher

         relation

asset_relation

         source

asset_source

         subject

asset_subject

         title

asset_title

     enabled

false

     nodeType

mgnl:asset

     assetProviderId

jcr

     rootNode

/

     type

dam-workbench

     workspace

dam

Node name Value

damWorkbenchFolders

     clients

         dam_wokbench

dam_wokbench

     fieldMappings

     enabled

false

     nodeType

mgnl:folder

     assetProviderId

jcr

     rootNode

/

     type

dam-workbench

     workspace

dam

DAM app configuration

Content connector

The Solr Workbench module introduces info.magnolia.search.solrsearchprovider.workbench.SolrJcrContentConnectorDefinition. It allows you to specify which client should be used.

The configuration snippet below is a YAML decoration showing how to use SolrJcrContentConnectorDefinition in the app:

/<light_module>/decorations/dam-app/apps/assets.subApps.browser.contentConnector.yaml
class: info.magnolia.search.solrsearchprovider.workbench.SolrJcrContentConnectorDefinition
client: dam_workbench

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 decoration snippet below shows SOLR-based content view definitions for the list, thumbnail and search views in the DAM app’s browser:

/<light_module>/decorations/dam-app/apps/assets.subApps.browser.workbench.contentViews.yaml
list:
  class: info.magnolia.search.solrsearchprovider.workbench.SolrListPresenterDefinition
search:
  class: info.magnolia.search.solrsearchprovider.workbench.SolrSearchPresenterDefinition
thumbnail:
  class: info.magnolia.search.solrsearchprovider.workbench.SolrThumbnailPresenterDefinition

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

dam-solr-workbench light module

Not compatible with the 6 UI-based DAM app.

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

Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the DX Core docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules