AEM Solr Search: Product Sample
This project was created as companion code for a couple of my 2016 talks:
- Advanced AEM Search - Consuming External Content and Enriching Content with Apache Camel - CIRCUIT 2016.
- Do you need an external search platform for Adobe Experience Manager? - IMMERSE'16
This project is built on top of AEM Solr Search and provides a demo eCommerce site in which the product integration is handled exclusively by Apache Solr.
core: Java code for the product demo.
ui.apps: Product demo templates and components.
ui.content: Product demo site.
camel-aem-to-solr: Standalone Apache Camel application for indexing AEM content into Solr.
camel-products-to-solr: Standalone Apache Camel application for ingesting Best Buy movie products into Solr.
demo-stack-vagrant: Vagrant image that includes Solr and ActiveMQ..
- Java 8
- Adobe AEM 6.1 (Only tested with AEM 6.1 SP1)
- Maven 3.2.x
- Vagrant: Required to run
- VirtualBox: Required to run
- AEM Solr Search 2.0.0
- Best Buy API Key
How to Deploy the Demo
Install Vagrant. This project uses Vagrant to fully provision Solr 5.4.1 in SolrCloud mode.
Install VirtualBox. The Vagrantfile packaged with this project uses VirtualBox.
Start AEM 6.1 author.
Clone, compile and install AEM Solr Search 2.0.0 to AEM author. You may want to clone this project in another directory (i.e., outside of this project).
$ git clone https://github.com/headwirecom/aem-solr-search.git $ cd aem-solr-search $ mvn clean install -Pauto-deploy-all
Provision the demo stack (e.g., Solr and ActiveMQ).
$ cd <root path to this project>/demo-stack-vagrant $ vagrant up
Deploy the AEM Solr Search Product Demo to AEM author.
$ cd ../ $ mvn clean install -PautoInstallPackage
Visit the Felix Console and update
AEM Solr Search - Solr Configuration Servicewith these demo settings:
/moviesto Allowed request handlers
SolrCloudas the Solr Mode
http://localhost:8983/solras the Master Server
After the installation, the following links may be useful:
Index the Best Buy movie product data. Refer to
Change into the
camel-aem-to-solrmodule and run Camel.
$ cd camel-aem-to-solr $ ./run.sh
In a new terminal, tail the log file so that you can monitor the JMS index listener in AEM.
$ tail -n0 -f /path-to-aem/crx-quickstart/logs/aemsolrsearch-product-sample.log
Create a page in AEM under
/content/aemsolrsearch-product-sample/en. Notice that the event is handled by the JMS listener; sent to the
aem-indextopic in ActiveMQ; read by Camel; and sent to Solr for indexing.