删除多元索引

更新时间:
复制 MD 格式

使用 Tablestore Go SDK 删除不再需要的多元索引。

前提条件

安装Tablestore Go SDK并初始化客户端。

功能说明

调用 DeleteSearchIndex 方法删除指定数据表上的多元索引。删除多元索引不会删除数据表中的数据。

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)
}

参数说明

名称

类型

说明

TableName(必选)

string

数据表名称。

IndexName(必选)

string

要删除的多元索引名称。