Modifying the replication factor allows you to scale up Solr without downtime.
Context
Standard Solr configuration assumes that the replication factor is set to 1. Adding additional replicas to a shard affects only the shard and collection you are modifying.
Procedure
- Go to Collections in the Solr dashboard.
- From the list of available collections, select the collection to scale and expand the Shard section.
- Click Add replica and specify the node to create the replica on. Do not duplicate replicas on the same node.
- Click Create replica and reload the page.
The new replica is visible on its designated shard and node in . In you can verify that the number of documents is the same on the source replica and its duplicate.
- To set the route cookie value:
- inspect the page
- set the route cookie value to the new replica
- refresh the page
- In the navigation menu on the left, select the modified collection and go to . Run the default query for every new replica you created.
- To make the change permanent, update the SAP Commerce Cloud configuration:
- In properties, set the n value in solr.config.%s.replicationFactor = n to your desired number, where %s is the Solr config name and n is the number of replicas.
- In Backoffice, go to . In the Cloud Mode Configuration section, set the Replication factor to the n value you specified before.
Results
The modified shard now has at least one replica. View the result in .