使用DeleteSearchIndex接口可以删除指定数据表的一个多元索引。
前提条件
参数
参数 | 说明 |
---|---|
TableName | 数据表名称。 |
IndexName | 多元索引名称。 |
示例
func DeleteSearchIndex(client *tablestore.TableStoreClient, tableName string, indexName string) {
request := &tablestore.DeleteSearchIndexRequest{}
request.TableName = tableName //设置数据表名称。
request.IndexName = indexName //设置多元索引名称。
resp, err := client.DeleteSearchIndex(request) //调用client删除多元索引。
if err != nil {
fmt.Println("error: ", err)
return
}
fmt.Println("DeleteSearchIndex finished, requestId: ", resp.ResponseInfo.RequestId)
}