Apache Solr Documentation

6.5 Ref Guide (PDF Download)
Solr Tutorial
Solr Community Wiki

Older Versions of this Guide (PDF)

Ref Guide Topics


*** As of June 2017, the latest Solr Ref Guide is located at https://lucene.apache.org/solr/guide ***

Please note comments on these pages have now been disabled for all users.

Skip to end of metadata
Go to start of metadata

Cluster Parameters


Defaults to 1

The number of shards to hash documents to. There must be one leader per shard and each leader can have N replicas.

SolrCloud Instance Parameters

These are set in solr.xml, but by default the host and hostContext parameters are set up to also work with system properties.


Defaults to the first local host address found

If the wrong host address is found automatically, you can override the host address with this parameter.


Defaults to the port specified via bin/solr -p <port>, or 8983 if not specified.

The port that Solr is running on. This value is only used when -DzkRun is specified without a value (see below), to calculate the default port on which embedded ZooKeeper will run. In the solr.xml shipped with Solr, the hostPort system property is not referenced, and so is ignored. If you want to run Solr on a non-default port, use bin/solr -p <port> rather than specifying -DhostPort.


Defaults to solr

The context path for the Solr web application.

SolrCloud Instance ZooKeeper Parameters


Defaults to localhost:<hostPort+1000>

Causes Solr to run an embedded version of ZooKeeper. Set to the address of ZooKeeper on this node; this allows us to know who you are in the list of addresses in the zkHost connect string. Use -DzkRun (with no value) to get the default value.


No default

The host address for ZooKeeper. Usually this is a comma-separated list of addresses to each node in your ZooKeeper ensemble.


Defaults to 15000

The time a client is allowed to not talk to ZooKeeper before its session expires.

zkRun and zkHost are set up using system properties. zkClientTimeout is set up in solr.xml by default, but can also be set using a system property.

SolrCloud Core Parameters


Defaults to being automatically assigned based on numShards

Specifies which shard this core acts as a replica of.

shard can be specified in the core.properties for each core.

  • No labels


  1. I propose we drop this page, since it discusses sysprops (which should no longer be user-visible because no-war) and solr.xml settings, which should be moved to the pages documenting solr.xml if not already there.

    1. I think I disagree. I rely on the war and the sysprops to configure my solr instances. Not sure how you would go about, say, assigning a shardId on a specific instance in another way.

  2. I'm pretty sure that zkClientTimeout defaults to 30 seconds in current code, but this says 15.  I will verify later and make sure this agrees with the code, but if someone else wants to do so immediately, feel free.

    1. I have figured out the source of my confusion.  SOLR-5565 did increase the default to 30 seconds, but it only did so by changing the example solr.xml files... there were no code changes.  So far I have been unable to find anyplace in the server code that sets the default timeout, not even to 15000.  I did find some code in CloudSolrClient that sets the default timeout to 10000 (a hard-coded value), which seems a little low.

      1. The default listed on this page is fine at 15000.  I found the place in the code that sets it – a private constant in the ConfigSolr class.

  3. For "shardId can be configured in solr.xml for each core element as an attribute.", I go to "Solr Cores and solr.xml" chapter and read through the Format of solr.xml but I don't see any part talking about shardId?

    1. that was old info based on the older style solr.xml – i've updated it to refer to core.properties.