All Products
Search
Document Center

Tablestore:Delete a search index

Last Updated:Aug 06, 2026

Use Tablestore SDK for Python to delete a search index without affecting the table or its data.

Prerequisites

Install the Tablestore SDK for Python and initialize a client.

Description

Call delete_search_index to delete a search index from a table.

def delete_search_index(self, table_name, index_name)
Warning

A deleted search index cannot be recovered. This operation deletes only the search index. It does not delete the table or its data.

The following example deletes example_index from example_table and verifies that the search index is no longer returned.

table_name = "example_table"
index_name = "example_index"

client.delete_search_index(table_name, index_name)

search_indexes = client.list_search_index(table_name)
assert (table_name, index_name) not in search_indexes

Parameters

The delete_search_index method contains the following parameters.

Name

Type

Description

table_name (required)

str

The table name.

index_name (required)

str

The search index to delete.