Reloading the search index
Changing search index config
To create and make changes to the search index config, follow these basic steps:
-
Create a search index. For example:
CREATE SEARCH INDEX ON demo.health_data;
-
Alter the search index. For example:
ALTER SEARCH INDEX CONFIG ON demo.health_data SET autoCommitTime = 30000;
-
Optionally view the XML of the pending search index. For example:
DESCRIBE PENDING SEARCH INDEX CONFIG on demo.health_data;
-
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.