All Products
Search
Document Center

Tablestore:Delete a search index

Last Updated:Aug 23, 2024

You can call the DeleteSearchIndex operation to delete a search index that is created for a data table.

Prerequisites

Usage notes

A deleted search index cannot be recovered. Proceed with caution.

Parameters

Parameter

Description

tableName

The name of the data table.

indexName

The name of the search index.

Examples

The following sample code provides an example on how to delete a search index:

client.deleteSearchIndex({
    tableName: TABLE_NAME, // Specify the name of the data table. 
    indexName: INDEX_NAME // Specify the name of the search index. 
}, function (err, data) {
    if (err) {
        console.log('error:', err);
        return;
    }
    console.log('success:', data);
});

References

If existing search indexes do not meet your business requirements, you can create search indexes or modify the schemas of existing search indexes to add, remove, and modify index fields. For more information, see Create a search index and Dynamically modify the schema of a search index.