The Architecture of the Hippo CMS Solr Integration
The HST Solr integration
The HST has 2 modules to support Solr integration
-
hst-solr-content-beans : A module for indexing and searching of ContentBean's and IdentifiableContentBean's. This module is completely independent of JCR. It only depends on hst-api, solr-solrj (Solr java client) and some deps like commons-lang
-
hst-solr-client : An SPI module that transitively pulls in the hst-solr-content-beans and provides some default implementations of some hst-solr-content-beans apis.
hst-solr-content-beans
The most important parts of this module are
-
small HST specific query api (mainly small wrapper api around some Solrj classes)
-
org.hippoecm.hst.solr.HippoSolrClient interface with methods like getSolrServer and createQuery
-
Custom DocumentObjectBinder, that replaces most of the Solrj DocumentObjectBinder, to more specifically index and query through Solrj: By default, Solrj supports one single flat POJO class to be indexed and bound back to a POJO from json search result. Since the HST supports a hierarchy of ContentBean's which can wrap other ContentBean's, we needed a richer DocumentObjectBinder than ships with Solrj.
hst-solr-client
This module contains
-
A HippoSolrClienImpl containing Hippo Repository specifics and JCR code
-
The Spring wiring to be able to access the HippoSolrClient from anywhere in HST code
-
Default JcrContentBeanBinder implementing org.hippoecm.hst.solr.content.beans.ContentBeanBinder to bind a Solr search result back to backing JCR Document if needed.
Web applications Solr integration
The Solr integration is completely pluggable, and will only be available in projects that include the hst-solr-client, and have a Solr webapp (or a remote Solr server). The hst-solr-client will pull in the hst-solr-content-beans transitively. The Solr webapp needs to have some mandatory parts in its Solr schema.xml, and optionally in its solr.xml config (multi-core for preview/live not implemented yet), and solrconfig.xml (for example to enable suggestions). If below the Solr webapp the admin files are available (like the case is for the testsuite), then, the Solr admin interface will be available at /solr/admin (assuming the webapp for solr is called solr)