- Customer is upgrading from Web 8.5 and Fredhopper to Tridion Sites 9.1 and Elasticsearch. - Administrator needs guidance in how to specify the Elasticsearch details in configuration file of a custom page application. - In Web 8.5, this had been done in a smarttarget_conf.xml file, with details such as the below. <IndexServer> <!-- On premise Url --> <Url>http://HOSTNAME:PORT_NO/</Url> <Authentication> <!--Note that the username/password for the Deployment Webservice and Index Server are combined here --> <!--If you're on premise and have authentication enabled on the index server they need to be the same as for the Deployment Webservice --> <Username>admin</Username> <Password>encrypted:PASSWORD</Password> </Authentication> ... - |
The Elasticsearch host details are configured in the config file cd_client_conf.xml file, the Tridion Sites 9.1 installation media folder Content Delivery\roles\xo\api\restful\ has been uploaded zipped to this article for convenience.
<QueryClient Class="com.sdl.tridion.xo.query.client.embedded.EmbeddedQueryClient" Embedded="true"> <QueryProvider Type="elasticsearch"> <Properties> <Property Name="index.common.name.prefix" Value=""/> <Property Name="es.host" Value="localhost"/> <Property Name="es.port" Value="9200"/> </Properties> </QueryProvider> </QueryClient>Other params outlined in documentation are https://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20Sites-v2/GUID-A312BFD7-A22E-402D-AFFD-714F1EEAC82B After upgrade, it may also be necessary to do some or all of these steps: 1. copy the restful dlls from Tridion / Content Delivery / roles / xo / api / restful / dotnet / bin. 2. copy the restful jars Tridion / Content Delivery / roles / xo / api / restful / dotnet / bin /lib. 3. For .NET in the web.xml, add page control <add tagPrefix="smarttarget" namespace="Tridion.SmartTarget.Web.UI" assembly="Tridion.SmartTarget" />4. For Experiments only, the handler <add name="XO Experiment Tracking" path="/redirect/" verb="" type="Tridion.SmartTarget.Analytics.TrackingRedirect" resourceType="Unspecified" /> Note that it is advised to use the restful API instead of in-process API for Tridion Sites 9.1, as in-process is now legacy. The Tridion.SmartTarget assembly and the QueryBuilder class is available in both APIs. |