Sample Application for the AEM-Solr Integration
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 Paging3, Highlighting4 and Spell checking5 are used.
If you don’t have a Solr instance running, you can use the provided Vagrantfile6 in
/misc/vagrant which requires Vagrant, Virtualbox7 and the vbguest Plugin8 to be installed. To start the box, just run
vagrant up and wait for the included Ansible-Script9 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 Application10, 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)