Reloading the search index

Steps to reload a search index to make the pending search index active.

After you modify the search index schema, config, or upload custom resource files (like a synonym file), reload the search index to make the pending search index active.

Changing search index config

To create and make changes to the search index config, follow these basic steps:
  1. Create a search index. For example:
    CREATE SEARCH INDEX ON demo.health_data;
  2. Alter the search index. For example:
    ALTER SEARCH INDEX CONFIG ON demo.health_data SET autoCommitTime = 30000;
  3. Optionally view the XML of the pending search index. For example:
    DESCRIBE PENDING SEARCH INDEX CONFIG on demo.health_data;
  4. Make the pending changes active. For example:
    RELOAD SEARCH INDEX ON demo.health_data;

The CQL command RELOAD SEARCH INDEX replaces the active search index with the pending version.

For operations, you can optionally reload a search index (also called a search core) on a single node using dsetool reload_core.

Note: If one or more nodes fail to reload the core in distributed operations, an error message indicates a list of the failing node or nodes. Issue the reload again only on those failing nodes using distributed=false.

Reindexing in place

Setting reindex=true and deleteAll=false reindexes data and keeps the existing index. During the uploading process, user searches yield inaccurate results. To perform an in-place reindex, use this syntax:
dsetool reload_core keyspace_name.table_name reindex=true deleteAll=false

Reindexing in full

Setting reindex=true and deleteAll=true deletes the index and reindexes the dataset. User searches initially return no or partial documents as the search cores reload and data is reindexed.
dsetool reload_core keyspace_name.table_name reindex=true deleteAll=true
During reindexing, a series of criteria routes sub-queries to the nodes most capable of handling them. See Shard routing for distributed queries.