Enabling Solr search sharding within a Docker-based deployment
Solr search sharding is included as an optional configuration with a provided Docker
Compose file. This enables Solr-based search deployments with large indexes to enable multiple
Java Virtual Machines (JVMs) to complete indexing work in parallel, reducing indexing time,
and alleviating any resource issues that can be encountered when using a single
JVM.
Before you begin
- Review Solr search sharding within the Search documentation.
- Build a customized
search-app
image to avoid permission issues.Use this sample Dockerfile to set the appropriate permissions.
Beginning with HCL Commerce 9.1.14.0, the default user for running HCL Commerce application containers was updated to be a non-root user. For more information, see HCL Commerce container users and privileges.
Procedure
-
Update your Docker Compose deployment configuration file
(docker-compose.yml) to include the configuration for your search
shards.
Use this sample Docker Compose configuration file to create your shard definitions.
- Start your deployment.
-
In the running Utility server Docker container, modify
/opt/WebSphere/CommerceServer90/properties/parallelprocess/di-parallel-process-multijvms.properties
to match your environment. You can use the following examples as a guide.
-
Start the indexing process with sharding in multiple JVMs enabled.
- Navigate to the
/opt/WebSphere/CommerceServer90/bin/
directory. - Run the following
command.
For more information, see Running utilities from the Utility server Docker container../di-parallel-process.sh /opt/WebSphere/CommerceServer90/properties/parallelprocess/di-parallel-process-multijvms.properties
- Navigate to the