Abstract
Objective
After reading this Article, You should have an Understanding of –
Replication Event Listener in AEM
Solr indexing of AEM asset or page data automatically
Introduction
In AEM, we mostly work with assets and pages. Sometimes the scenario comes to publish the content and it automatically indexes the data to Solr for better search implementation. We can achieve this with the help of the Replication Event Listener. When we press the publish button, the Event Listener will trigger and send the necessary data to the Solr Collection.
Hence, without any further delay, let’s get started:
Dependency required for Solr implementation in AEM
Dependency in core pom.xml
org.apache.servicemix.bundles
org.apache.servicemix.bundles.solr-solrj
8.11.1_1
org.apache.servicemix.bundles
org.apache.servicemix.bundles.zookeeper
3.7.0_1
Dependency in all pom.xml
org.apache.servicemix.bundles
org.apache.servicemix.bundles.solr-solrj
/apps/learning-packages/application/install
org.apache.servicemix.bundles
org.apache.servicemix.bundles.zookeeper
/apps/learning-packages/application/install
Replication Event Listener for indexing content and asset data to Solr
The Replication Event Listener is an event handler that triggers when you publish any content in AEM. The below event handler shows the solr implementation and indexing. Here we are sending some basic data (i.e. id, path, title, and description) to Solr. Further, we can use the same data for search functionality. So let’s see the implementation code.
Read Full Blog
Q&A
Please use this thread to ask the related questions.
Kautuk Sahni