Step 4: Installing the Experience Optimization Query Service

Install the Experience Optimization Query Service to enable communication between the website and Elasticsearch.

Procedure

  1. Access your installation media and go to the following folder:
    xo-query\standalone\
  2. Copy all files and subfolders to the desired location in your Content Delivery server environment.
    You can put these resources in any folder you like and can also rename the folder, as needed.
  3. In the configuration location of the service, open the smarttarget_conf.xml file for editing.
  4. Copy the Analytics section from that file to your Query service smarttarget_conf.xml file.
  5. Save and close smarttarget_conf.xml.
  6. From the bin\ subfolder, open a PowerShell prompt.
  7. Type one of the following commands, but do NOT yet press Enter, as you also need to include additional parameters for Elasticsearch:
    • For Windows:
      & '.\installService.ps1' --auto-register
    • For Unix-based systems:
      .\start.sh --auto-register
  8. Add the parameters es.host and es.port with appropriate values for your implementation.

    The following table describes these and other available parameters for Elasticsearch.

    ParameterDescriptionDefault value
    es.hostHost name of the Elasticsearch instance to which you want to connectlocalhost
    es.portPort of the Elasticsearch instance 9200
    es.schemeThe protocol used
    • HTTP
    • HTTPS
    http
    es.client.max.connections.per.route Maximum connections for the route to the Elasticsearch server30
    es.client.max.connectionsMaximum number of open connections the underlying HTTP client is allowed to have100
    es.client.connection.request.timeoutNumber of milliseconds before a connection request times out 10000
    es.client.connect.timeoutNumber of milliseconds before a connect action times out 10000
    es.client.socket.timeoutNumber of milliseconds before the socket times out 30000
    es.client.max.retry.timeoutNumber of milliseconds before a retry connect times out 30000
    index.common.name.prefixStarts the service with an prefix added to the Elasticsearch index

    A prefix is needed only when running the same Elasticsearch instance for Experience Optimization and for IQ Search (a future Tridion Sites release).

    none
    The following command illustrates the Windows command with sample parameter values:
    & '.\installService.ps1' --auto-register --es.host=10.100.101.52 --es.port=9200
  9. Press Enter to execute the command.