Reloading the search index

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:

  4. Make the pending changes active. For example:

    RELOAD SEARCH INDEX ON demo.health_data;

The CQL command RELOAD SEARCH INDEX rebuilds the search index.

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

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.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000,