Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

AEM Solr Sample

This project provides an out of the box example how to use an external Solr instance in AEM. For a detailed introduction, have a look at my blog where I show the required steps to adapt this application to your needs.

Implemented Features

The following search features can be tested with this project:

Missing features (planned):

  • MoreLikeThis: already available through the query-parameters mlt=on&mlt.fl=text
  • Suggester
  • Faceting: already available through the query-parameters facet.field=jcr_mimeType&facet=on&indent=on&q=path_collapsed:*/content/dam/* (requires geometrixx sample content)


You don't need to configure anything manual using this project, just checkout the Git repository and perform the following steps:


If you want to run this project without any required modifications, this should be available on your machine:

Start Solr using Vagrant

You can use the VagrantFile provided in /misc/vagrant to setup a local Solr instance. It assumes that you are using VirtualBox as provider.

vagrant up

This will create a local box running Debian and Solr 6.4. The vm listens on the private only IP, so Solr Admin can be reached on

Provision AEM

As soon as Solr is running, you can start the which will install a sample-application in AEM and configure AEM to use Solr as Indexer.

The examples use the Sample Application enriched with Wikipedia Content created using wiki2aem.

To install the application, basic configuration and sample-content execute the deploy script

Afterwards you can find a Search Page on http://localhost:4502/content/wcm-io-samples/en/search.html.

Manual Setup

The following steps are not required if you use the Quickstart Guide above.


This readme assumes, that you have a Solr 6.x instance and AEM6.2 running. Depending on your configuration, you need to change the given urls/ports.


As soon as Solr is running, you need to create a new core names "oak" and deploy a basic schema.

su - solr
/opt/solr/bin/solr create -c oak

You can find the schema definitions in \misc\schema and should copy them into your core's conf folder and reload the core.


System Console

System Console:

Apache Jackrabbit Oak Solr remote server configuration

Solr HTTP Url: Zookeeper Host: empty

Apacke Jackrabbit Oak Solr server provider

ServerType: Remote Solr

Apache Jackrabbit Oak Solr indexing / search configuration

collapse jcr:content nodes: Enabled

Solr Search Server Configuration

Solr HTTP Url:



Create a new node solrIndex in oak:index with the following properties:

Property Type Value
jcr:primaryType Name oak:QueryIndexDefinition
type String solr
async String async
reindex Boolean true

As soon as you hit save, AEM will start to index the existing content in Solr. This might take some time, you can see the current amount of documents in the Solr Admin UI


Examples for the usage of Solr in AEM




No releases published


No packages published