Adding Advanced Search to a Project - BloomReach Experience - Open Source CMS

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

12-05-2015

Adding Advanced Search to a Project

This feature is only available in Hippo's Enterprise Edition. Please  contact us for more information.

Adding Advanced Search to a project

Setup the project as a Enterprise project as described here.

Add the following dependencies to your CMS module:

<dependency>
  <groupId>com.onehippo.cms7</groupId>
  <artifactId>hippo-addon-advanced-search-frontend</artifactId>
  <type>pom</type>
</dependency>
<dependency>
  <groupId>com.onehippo.cms7</groupId>
  <artifactId>hippo-addon-advanced-search-repository</artifactId>
</dependency>

Note: After adding the dependencies you need to rebuild your project.

 

Configure the document types to be selected

The document types that can be selected in the filtering section of the search perpective are configured by two properties in the genericFilters plugin in the perspective at location

/hippo:configuration/hippo:frontend/cms/cms-advanced-search/genericFilters

In the Hippo Go Green, this is achieved using

<?xml version="1.0" encoding="UTF-8"?><sv:node sv:name="genericFilters"
         xmlns:esv="http://www.onehippo.org/jcr/xmlimport"
         xmlns:sv="http://www.jcp.org/jcr/sv/1.0"
         esv:merge="combine">
  <sv:property sv:name="jcr:primaryType" sv:type="Name">
    <sv:value>frontend:plugin</sv:value>
  </sv:property>
  <sv:property sv:multiple="true" sv:name="document.type.namespaces"
               sv:type="String">
    <sv:value>hippogogreen</sv:value>
  </sv:property>
  <sv:property sv:multiple="true" sv:name="document.type.excluded"
               sv:type="String">
    <sv:value>hippogogreen:basedocument</sv:value>
  </sv:property>
</sv:node>

I.e. all document types in the hippogogreen namespace, except hippogogreen:basedocument.

 

Configure if subtypes of document types need to be selected

It is configured in a property whether the search action needs to select also subtypes of the selected document type. This is a boolean at the same location, which is false when absent. 

<?xml version="1.0" encoding="UTF-8"?>
<sv:node sv:name="genericFilters"
         xmlns:esv="http://www.onehippo.org/jcr/xmlimport"
         xmlns:sv="http://www.jcp.org/jcr/sv/1.0"
         esv:merge="combine">
  <sv:property sv:name="document.subtypes.included" sv:type="Boolean" esv:merge="skip">
    <sv:value>false</sv:value>
  </sv:property>
</sv:node>
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?