To delete an index definition from the store, use a
DROP INDEX statement. Its form when deleting an index is:
DROP INDEX [IF EXISTS] index-name ON table-name
IF EXISTSis optional, and it causes the
DROP INDEXstatement to be ignored if an index by that name does not exist. If this phrase is not specified, and an index using the specified name does not exist, then the
DROP INDEXstatement will fail with an error.
index-name is the name of the index you want to drop.
table-name is the name of the table containing the index you want to delete.
For example, if table
Users has an index called
surnameIndex, then you can delete it using the following statement:
DROP INDEX IF EXISTS surnameIndex ON Users
DROP INDEX on a text index to stop the population of the index from NoSQL Database shards, and removes the mapping and all related documents from Elasticsearch. See the following statement:
DROP INDEX [IF EXISTS] index_name ON table_name
kv-> execute 'DROP INDEX JokeIndex on Joke' Statement completed successfully
While deleting index, you can use the
OVERRIDE flag. The
DROP INDEX statement uses the
OVERRIDE flag to enable overriding of the default constraints:
DROP INDEX [IF EXISTS] index_name ON table_name [OVERRIDE]
DROP INDEX JokeIndex on Joke OVERRIDE
For more information, see the following sections in the Oracle NoSQL Database Full Text Search guide: