使用 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 | 要刪除的多元索引名稱。 |