Adding search capability to your domain model with Sol
Apache Solr
is an open-source search platform built on top of the Apache Lucene
search engine library. Spring Roo's Solr add-on
provides support for integrating the Roo-generated domain model with Solr platform. In this recipe, we'll look at how Roo makes use of SolrJ Java client library
to add domain model data into Solr server for indexing and to search domain model data based on user supplied query parameters.
Getting ready
To see Roo's support for Solr in action, you need to download and run the Solr server, as described here:
Download the Solr server version 1.4.0 ZIP file from
Solr
website
and unzip the bundle into a directory. Let's call the unzipped directory asSOLR_HOME
.Go to the
SOLR_HOME\example
directory and start Solr server:C:\...\apache-solr-1.4.0\example> java –jar start.jar
Open the web browser and verify that Solr server has successfully started by going to the following URL:
http://localhost:8983/solr/admin/
...