HST Solr Client - BloomReach Experience - Open Source CMS

This article covers a Hippo CMS version 11. There's an updated version available that covers our most recent release.

HST Solr Client

The hst-solr-client module is mostly a very small SPI which has a default org.hippoecm.hst.solr.HippoSolrClientImpl implementation and a single binder of Solr results to a backing store, namely org.hippoecm.hst.solr.HippoSolrClientImpl.JcrContentBeanBinder.

The module also contains the Spring wiring for the child spring component beans manager for developers to be able to access the HippoSolrClient in their project. For example :

Getting hold of the HippoSolrClient:

HippoSolrClient solrClient =   HstServices.getComponentManager().getComponent(
                  HippoSolrClient.class.getName(), "org.hippoecm.hst.solr");

The spring configuration in the hst-solr-client for this looks like below

The SpringComponentManager-solr.xml

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">

  <bean id="org.hippoecm.hst.solr.HippoSolrClient"
        class="org.hippoecm.hst.solr.HippoSolrClientImpl">
      <property name="solrUrl" value="${solr.url}"/>
  </bean>
</beans>

and the module.xml

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns=
        "http://www.onehippo.org/schema/hst/hst-addon-module_1_0.xsd">
  <name>org.hippoecm.hst.solr</name>
  <config-locations>
    <config-location>
        classpath*:META-INF/hst-assembly/addon/org/hippoecm/hst/solr/*.xml
    </config-location>
  </config-locations>
</module>


Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?