Step 4: Installing the Experience Optimization Query Service
Install the Experience Optimization Query Service to enable communication between the website and Elasticsearch.
Procedure
- Access your installation media and go to the following folder:
xo-query\standalone\
- 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.
- In the configuration location of the service, open the smarttarget_conf.xml file for editing.
- Copy the
Analyticssection from that file to your Query service smarttarget_conf.xml file. - Save and close smarttarget_conf.xml.
- From the bin\ subfolder, open a PowerShell prompt.
- 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
Note: Include theauto-registerparameter if you want the service to automatically register itself as a Capability with the Discovery Service. - For Windows:
- 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.
Parameter Description Default value es.host Host name of the Elasticsearch instance to which you want to connect localhostes.port Port of the Elasticsearch instance 9200es.scheme The protocol used HTTPHTTPS
httpes.client.max.connections.per.route Maximum connections for the route to the Elasticsearch server 30es.client.max.connections Maximum number of open connections the underlying HTTP client is allowed to have 100es.client.connection.request.timeout Number of milliseconds before a connection request times out 10000es.client.connect.timeout Number of milliseconds before a connect action times out 10000es.client.socket.timeout Number of milliseconds before the socket times out 30000es.client.max.retry.timeout Number of milliseconds before a retry connect times out 30000index.common.name.prefix Starts 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 - Press Enter to execute the command.