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 ../../search/concepts/csdsolrsearchsharding.html within the Search documentation.
- Build a customized
search-appimage to avoid permission issues.Use this sample Dockerfile to set the appropriate permissions.
Beginning with 9.1.14.0, the default user for running application containers was updated to be a non-root user. For more information, see ../concepts/ciginstall_nonrootdocker.html.
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 , 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../di-parallel-process.sh /opt/WebSphere/CommerceServer90/properties/parallelprocess/di-parallel-process-multijvms.properties
- Navigate to the