Use the Tablestore SDK for Go to delete a search index that is no longer needed.
Prerequisites
Install the Tablestore Go SDK and initialize a client.
Description
Call DeleteSearchIndex to delete a search index from a data table. Deleting a search index does not delete data from the data table.
func (client *tablestore.TableStoreClient) DeleteSearchIndex(request *tablestore.DeleteSearchIndexRequest) (*tablestore.DeleteSearchIndexResponse, error)
_, err := client.DeleteSearchIndex(&tablestore.DeleteSearchIndexRequest{
TableName: "example_table",
IndexName: "example_index",
})
if err != nil {
log.Fatal(err)
}
Parameters
|
Name |
Type |
Description |
|
TableName (required) |
string |
The name of the data table. |
|
IndexName (required) |
string |
The name of the search index to delete. |