Rapid prototyping with Solaritas

Solritas is the name of a contribution module that integrates Solr with Apache Velocity. It is basically a response writer that uses the Apache Velocity template engine to render Solr responses with a graphical user interface.

A set of ready-to-use Velocity templates is combined with Solr responses in order to provide a search GUI with a lot of features (for example, faceting, highlighting, and autocompletion).

Tip

You can find the Velocity templates under the src/solr/solr-home/example/conf/velocity folder of the ch7 project, or under the example/solr/collection1/conf/velocity folder of the Solr download bundle.

As this GUI is directly provided by transforming the emerging Solr responses, there's no need for an external web application to execute searches and graphically see the corresponding results.

Okay, one could now say, "This is already possible with the Solr REST services", but that is definitely more technically complex and the search results are displayed in XML or JSON or whatever format. Here, a more user-friendly interface is provided, as shown in the following screenshot:

Rapid prototyping with Solaritas

That makes Solritas an ideal choice to build rapid prototypes. The sample instance you started at the beginning of this chapter has Solritas configured in solrconfig.xml. It responds to the /solritas endpoint, so after indexing some data from the previous paragraph, open your browser and type http://127.0.0.1:8983/solr/example/solritas.

Tip

The Velocity templates have been copied from the Solr download bundle, so some areas (such as Google Maps widgets, spatial queries, and range queries) might not be visible or might not make sense with the chapter's sample data. If you want to see all of them in action, just start the Solr example in the download bundle and navigate to http://127.0.0.1:8983/solr/browse address.

You should see Solritas' results page, which is preloaded with a *:* query by default.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.122.11