Configure Elasticsearch 8.x for use with HCL Commerce Search
When using Elasticsearch 8.x with Elasticsearch-based HCL Commerce Search, you may encounter issues such as indexing failures or connection problems. This happens because Elasticsearch 8 enables security by default, which is not currently supported by HCL Commerce Search.
Configuration
To ensure HCL Commerce Search works correctly, you need to disable Elasticsearch security and update a cluster setting. Start by updating your Elasticsearch configuration.
If you are using a Docker-based setup, open your docker-compose template file (for
example, docker-compose-elasticsearch-data-db2-template.yml).
In the elasticsearch section, add the following under the environment
configuration:
- xpack.security.enabled: 'false'
- xpack.security.http.ssl.enabled: 'false'
- xpack.security.transport.ssl.enabled: 'false'
After disabling security, you may still see indexing errors in older HCL Commerce Search versions (9.1.19.0 and earlier) as "Error encountered while
deleting index catalog". This happens because older HCL Commerce Search
versions (9.1.19.0 and earlier) use wildcard-based index deletion, which
Elasticsearch 8 blocks by default. To fix this, update the Elasticsearch cluster
setting by running:
curl
-X PUT "http://<Elasticsearch_hostname>:<port>/_cluster/settings" \
-H "Content-Type: application/json" \
-d '{
"persistent": {
"action.destructive_requires_name": false
}
}'Once these changes are applied, HCL Commerce Search can
successfully connect to Elasticsearch 8.x and perform indexing without errors.