Sample Application for the AEM-Solr Integration
Reading time2 Minutes
If you have a local AEM instance running, you can use the application I pushed into the solr-aem Github repository1 to get a running website with Solr integration.
The README.md2 gives a detailed view on the application therefor I constrain the blog post to the basics. The application includes a simple Search page where Paging8, Highlighting9 and Spell checking10 are used.
If you don't have a Solr instance running, you can use the provided Vagrantfile3 in
/misc/vagrant which requires Vagrant, Virtualbox4 and the vbguest Plugin5 to be installed. To start the box, just run
vagrant up and wait for the included Ansible-Script6 to install and configure Solr for you.
After the startup, you can access Solr on http://192.168.50.10:8983/solr/#/oak.
Installation AEM Application
The installation of the AEM sample application is even easier and done using the
clean_install_deploy_package.sh script. This will build the application, download some dependencies (wcm.io Sample Application7, SolrJ[^solrj] etc) and install the application, configuration and sample-content into the instance.
If everything went through, you can find a Search Page on http://localhost:4502/content/wcm-io-samples/en/search.html.
It might happen, that you can't find any result here (either because Indexing in Solr has not finished yet or because the index has not been commited yet). So keep an eye on Solr and perform a manual commit if necessary (http://192.168.50.10:8983/solr/oak/update?commit=true)