Replace AEM OOTB Index with Remote SOLR | Community
Skip to main content
Shashi_Mulugu
Community Advisor
Community Advisor
August 21, 2023
Solved

Replace AEM OOTB Index with Remote SOLR

  • August 21, 2023
  • 1 reply
  • 598 views

Hello all,

 

We want to replace AEM OOTB lucene index with remote solr, leverage it for all OOTB functionalities as the data we have in AEM is too high, AEM OOTB index data itself is going out of bounds and breaking.

 

We dont find any documentation aroung it, like how exactly to disable OOTB indexes, and configure remote solr, path restrictions, property restrictions etc..

 

@joerghoh @kautuk_sahni 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

To replace the AEM OOTB Lucene index with a remote Solr server, you will need to:

  1. Install and configure Solr.
  2. Configure AEM to use the remote Solr server.
  3. Disable the AEM OOTB index.
  4. Migrate your existing data to the remote Solr server.
  5. Configure path and property restrictions for the remote Solr server.

Installing and configuring Solr

You can download and install Solr from the Apache Solr website. Once Solr is installed, you will need to configure it. This includes setting up the Solr schema, creating a Solr core, and configuring Solr security.

Configuring AEM to use the remote Solr server

To configure AEM to use the remote Solr server, you will need to edit the OakRepositoryConfig.xml file. This file is located in the /WEB-INF/config/ directory of your AEM installation.

In the OakRepositoryConfig.xml file, you will need to add the following configuration:

<searchProvider class="org.apache.jackrabbit.oak.solr.OakSolrProvider"> <server>http://localhost:8983/solr</server> <core>aem</core> </searchProvider>​

Disabling the AEM OOTB index

To disable the AEM OOTB index, you will need to edit the org.apache.jackrabbit.oak.osgi.config.RepositoryConfigurationImpl OSGi configuration. This configuration is located in the /etc/config/org.apache.jackrabbit.oak/ directory of your AEM installation.

In the org.apache.jackrabbit.oak.osgi.config.RepositoryConfigurationImpl OSGi configuration, you will need to set the query.index property to solr.

You also have to think about Migrating your existing data to the remote Solr server.

 

Documentation:

1 reply

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
October 4, 2023

To replace the AEM OOTB Lucene index with a remote Solr server, you will need to:

  1. Install and configure Solr.
  2. Configure AEM to use the remote Solr server.
  3. Disable the AEM OOTB index.
  4. Migrate your existing data to the remote Solr server.
  5. Configure path and property restrictions for the remote Solr server.

Installing and configuring Solr

You can download and install Solr from the Apache Solr website. Once Solr is installed, you will need to configure it. This includes setting up the Solr schema, creating a Solr core, and configuring Solr security.

Configuring AEM to use the remote Solr server

To configure AEM to use the remote Solr server, you will need to edit the OakRepositoryConfig.xml file. This file is located in the /WEB-INF/config/ directory of your AEM installation.

In the OakRepositoryConfig.xml file, you will need to add the following configuration:

<searchProvider class="org.apache.jackrabbit.oak.solr.OakSolrProvider"> <server>http://localhost:8983/solr</server> <core>aem</core> </searchProvider>​

Disabling the AEM OOTB index

To disable the AEM OOTB index, you will need to edit the org.apache.jackrabbit.oak.osgi.config.RepositoryConfigurationImpl OSGi configuration. This configuration is located in the /etc/config/org.apache.jackrabbit.oak/ directory of your AEM installation.

In the org.apache.jackrabbit.oak.osgi.config.RepositoryConfigurationImpl OSGi configuration, you will need to set the query.index property to solr.

You also have to think about Migrating your existing data to the remote Solr server.

 

Documentation:

Kautuk Sahni