You can call the DeleteSearchIndex operation to delete a search index that is created for a data table.
Prerequisites
The OTSClient is initialized. For more information, see Initialize an OTSClient instance.
A data table is created. Data is written to the table.
A search index is created for the data table. For more information, see Create a search index.
Usage notes
A deleted search index cannot be recovered. Proceed with caution.
Parameters
| Parameter | Description |
|---|---|
| table_name | The name of the data table. |
| index_name | The name of the search index. |
Examples
The following sample code shows how to delete a search index:
client.delete_search_index('<TABLE_NAME>', '<SEARCH_INDEX_NAME>')References
To query the list of search indexes that are created for a data table, see List search indexes.
To create a search index or modify the schema of an existing search index, see Create a search index and Dynamically modify the schema of a search index.