• Home
  • Docker
  • Kubernetes
  • Java
  • Ubuntu
  • Maven
  • Big Data
  • CI
  • Install
  • Samples
  • Archived
Apache Solr | Overview: Standalone/SolrCloud
  1. Standalone/SolrCloud Modes
  2. Standalone Mode: Structure of the Solr home directory
  3. SolrCloud Mode: Structure of the Solr home directory
  4. "Collection", "Shard", "Replica", and "Core"

  1. Standalone/SolrCloud Modes
    Solr supports 2 modes: Standalone and SolrCloud.
    The SolrCloud mode allows multiple running Solr instances to form a cluster.
    When running Solr as a Standalone server, you will create cores to save documents.
    When running Solr Cloud, you will create collections to save documents.

    Environment variable: "${SOLR_HOME}"
    • Both Standalone and SolrCloud require a Solr home directory that contains the configuration of the running Solr instance along with its data.

    • "${SOLR_HOME}" is the path to the Solr home directory; for example: "/opt/solr/server/solr".

    Environment variable: "${SOLR_ROOT}"
    • "${SOLR_ROOT}" is the path to the Solr distribution directory; for example: "/opt/solr".
  2. Standalone Mode: Structure of the Solr home directory
    Here's a typical structure of the Solr home directory when running Solr using the Standalone Mode:

    Notes:
    • ${SOLR_HOME}/solr.xml
      This file contains the configuration parameters of the Solr instance.
      Solr home directory ${SOLR_HOME} must contain a solr.xml file, otherwise Solr will fail to start.


    • ${SOLR_HOME}/CORE-NAME/core.properties
      This file contains information about the core, such as its name.

      When you use the Solr API (or Solr UI) to create a new core, you can set the core directory name (instanceDir), the core name (name), the data directory (dataDir), the solr configuration file (config), the Solr schema file (schema).

      The core directory and its configuration need to exist before you can create the core.



      Apache Solr/Standalone - Add Core



      Note that when you use the Solr command line to create a new core, only the property name is added to the core.properties file.
      The value of the property name will be used to create the directory name of the core.



    • ${SOLR_HOME}/CORE-NAME/data
      This directory contains the index files.

    • ${SOLR_HOME}/CORE-NAME/conf
      This directory contains the configuration files.

  3. SolrCloud Mode: Structure of the Solr home directory
    Here's a typical structure of the Solr home directory when running Solr using the SolrCloud Mode:

    Notes:
    • ${SOLR_HOME}/solr.xml
      This file contains the configuration parameters of the Solr instance.
      See above an example of a simple "solr.xml" file.
      Solr home directory ${SOLR_HOME} must contain a solr.xml file, otherwise Solr will fail to start.

    • ${SOLR_HOME}/zoo.cfg
      It contains the configuration parameters of the embedded ZooKeeper.
      It is used only when running Solr in SolrCloude mode with an embedded ZooKeeper.
      When running Solr with an embedded ZooKeeper, then Solr home directory ${SOLR_HOME} must contain a zoo.cfg file, otherwise Solr will fail to start.


    • ${SOLR_HOME}/REPLICA-NAME/core.properties
      This file contains the name of Solr configuration, collection, shard, and replica.
      In the case of SolrCloud, this file will contain the name of Solr configuration, collection, shard, and replica.


    • ${SOLR_HOME}/REPLICA-NAME/data
      This directory contains the index files.
  4. "Collection", "Shard", "Replica", and "Core"
    When running Solr as a standalone server, the term "Core" will refer to the complete logical index that will contain documents.

    When running Solr in SolrCloud mode, the term "Collection" will refer to the complete logical index that will contain documents.

    ► A Collection can be split into many shards.
    ► A Shard will contain a subset of the documents in the index.
    ► A Shard can have many replicas (copies).

    If you have a cluster of two or more Solr instances, each instance can hold a replica.
    If one Solr instance goes down, another instance can serve clients' requests.

    Note that, in SolrCloud mode, the term "Core" will be used to refer to the replica:
    ► You will notice that a file "core.properties" is created for each replica.
    ► Also, in the Solr Admin UI you will notice that there's a "Collection Selector" and "Core Selector" (and not a Shard or Replica selector).
© 2025  mtitek