Add Relevance Experiments and Trends to a Project

This Bloomreach Experience Manager feature requires a standard or premium license. Please contact Bloomreach for more information.



Add Relevance Experiments and Trends to a Bloomreach Experience Manager implementation project.


Experiments and Trends are two optional features of the Relevance Module. This page explains how to add Experiments and Trends to a project and configure its data stores in a local Cargo-based development environment. After the steps explained below, the Content audiences application will contain two additional tabs called Trends and Goals.


After installation, be sure that the dataflow configuration is correct: the Visits Aggregator and the Model Trainer should be running.

Installation through Essentials

The installation of Relevance Experiments and Trends is supported through Essentials. If you start developing a new project, make sure to check Make use of Enterprise features. Navigate to the Library tab in Essentials, locate the Relevance Experiments and Trends feature and click Install feature. Essentials then applies most of the steps documented for manual installation below to your project.

Rebuild and restart your project.

Manual Installation Instructions

The instructions below assume you already followed Add the Relevance Module to a Project.

Add the Elasticsearch Maven Plugin to the Cargo Run Profile

In your local Cargo-based development environment, use the Elasticsearch Maven Plugin to add an Elasticsearch instance to store visits data.

In your project's top-level pom.xml, locate the profile. Make the following changes the the profile:

Add the following properties to the profile's <properties> element:

        <!-- existing properties here --> 

Directly after the profile's <plugins> opening element, add the following plugin configuration:


This will start up a local Elasticsearch instance when running mvn -P The visits data store is configured to use this local Elasticsearch instance by default.

Configure a JNDI Environment Variable for Elasticsearch Properties

In your local Cargo-based development environment, add a JNDI environment variable that contains configuration properties for connecting to Elasticsearch.

Add the following JNDI environment variable to conf/context.xml:

<Environment name="elasticsearch/targetingDS" type="java.lang.String"
             value="{'indexName':'visits', 'locations':['http://localhost:9200/']}" />

The visits data store will use these properties to instantiate a client for connecting to the Elasticsearch webapp that you added previously.

Enable Elasticsearch Support in HST Config Properties

In cms/src/main/webapp/WEB-INF/, make sure that Relevance Elasticsearch support is not disabled:

targeting.elastic.disabled = false
Because false is the default value, you may also completely remove the above line from

Rebuild and Restart

Stop the application (if it was running), and rebuild and (re)start it as explained in the Getting Started Trail.

Verify that the Elasticsearch webapp is running correctly by browsing to the following URL:


You should see something like this:

health status index          pri rep docs.count docs.deleted store.size 
green  open   visits           1   0          0            0       159b           159b

Run in Docker

To add Relevance Elasticsearch support for Docker, follow the instructions below.

Add the following resource/environment configuration into context-mysql.xml or context-postgres.xml:

<Environment name="elasticsearch/targetingDS" type="java.lang.String"
 value="{'indexName':'visits', 'locations':['']}"/>

Add the following lines to mysql/ or postgres/

sed --in-place 's/'"$ELASTICSEARCH_HOST"'/' /usr/local/tomcat/conf/context-$profile.xml
sed --in-place 's/@es.port@/'"$ELASTICSEARCH_PORT"'/' /usr/local/tomcat/conf/context-$profile.xml

Add Docker elasticsearch profile




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?