Managing the location of Solr data

Manage where the Solr data files are saved on the server.

Data that is added to a DSE Search node is locally indexed in the Cassandra node. Data changes to one node also apply to the other node. Like Cassandra data files, DSE Search has its own indexing files. You can control where the Search indexing data files are saved on the server. By default, the Solr data is saved in cassandra_data_dir/solr.data, or as specified by the dse.solr.data.dir system property.
Note: The <dataDir> parameter in the solrconfig.xml file is not supported.

Procedure

  1. Shut down the search node.
  2. Move the solr.data directory to the new location.
  3. Specify the location:
    Option Description
    From the command line
    $ cd install_location
    $ bin/dse cassandra -s -Ddse.solr.data.dir=/solr_data_dir
    In dse.yaml
    solr_data_dir: solr_data_dir
    The location of the dse.yaml file depends on the type of installation:
    Installer-Services /etc/dse/dse.yaml
    Package installations /etc/dse/dse.yaml
    Installer-No Services install_location/resources/dse/conf/dse.yaml
    Tarball installations install_location/resources/dse/conf/dse.yaml
  4. Start the node.

Results

The location change is permanent only when set in dse.yaml. The command-line argument must be used consistently or DSE reverts to the default data directory.