Cloud Solr Server Advanced Configuration
Learn how to install and configure a cloud Solr server in a way that can be used in SAP Commerce.
Using the solrserver Extension
By enabling the solrserver extension in your localextensions.xml file you will get a Solr server instance ready to be used. For the quick installation guide, see Cloud Solr Server Quick Installation.
Using an External Standalone Server
Each version of SAP Commerce has the possibility of supporting more than one Solr version to maintain compatibility. Each version includes the server directory containing the server and the applied customizations, and the customizations directory contatning modifications that can be applied to an official Solr release. For the installation steps, see the Installation section in Multiple Solr Version Support.
-
On linux systems:
# ./bin/solr start -p 8983 Waiting up to 30 seconds to see Solr running on port 8983 [/] Started Solr server on port 8983 (pid=23092). Happy searching! # ./bin/solr stop -p 8983 Sending stop command to Solr running on port 8983 ... waiting 5 seconds to allow Jetty process 23092 to stop gracefully.
-
On windows systems:
# bin\solr.cmd start -p 8983 Waiting up to 30 to see Solr running on port 8983 Started Solr server on port 8983. Happy searching! # bin\solr.cmd stop -p 8983 Stopping Solr process 6256 running on port 8983 Waiting for 0 seconds, press a key to continue ...
Zookeper Authentication and Authorization
By default, the authentication and authorization is not enforced when a server attempts to join a quorum. That's why it is recommended to turn them on. For instructions on how to do it, see Authorization and Authentication Plugins in Solr Cloud Mode
.
Cluster Configuration
This section describes how to set up a cluster of Solr servers using SolrCloud. This is especially useful when you need advanced fault tolerance and high availability capabilities.
SolrCloud is flexible distributed search and indexing, without a leading node to allocate nodes, shards and replicas. Instead, Solr uses ZooKeeper to manage these locations, depending on configuration files and schemas. Queries and updates can be sent to any server. Solr uses the information in the ZooKeeper database to figure out which servers need to handle the request.
For more details on the cloud see: https://cwiki.apache.org/confluence/display/solr/SolrCloud
.
-
local.properties file:
solrserver.instances.cloud1.autostart=false solrserver.instances.cloud1.mode=cloud solrserver.instances.cloud1.port=8983 solrserver.instances.cloud1.memory=512m solrserver.instances.cloud1.zk.host= solrserver.instances.cloud1.zk.upconfig=true solrserver.instances.default.autostart=false solrserver.instances.cloud1.hostname=<hostIPAddress> / localhost solrserver.instances.cloud2.autostart=false solrserver.instances.cloud2.mode=cloud solrserver.instances.cloud2.port=8984 solrserver.instances.cloud2.memory=512m solrserver.instances.cloud2.zk.host=localhost:9983 solrserver.instances.cloud2.zk.upconfig=false solrserver.instances.cloud2.hostname=<hostIPAddress> / localhost
-
Starting the servers:
# ant startSolrServer -Dinstance.name=cloud1 # ant startSolrServer -Dinstance.name=cloud2
Update the Solr server configuration using the Backoffice Administration Cockpit.
-
Mode: set it to cloud.
-
Endpoint URLs: should contain one or more urls of the ZooKeeper servers. The urls should follow the pattern {hostname}:{port}: localhost:9983