全部產品
Search
文件中心

Tablestore:刪除多元索引

更新時間:Aug 27, 2026

調用DeleteSearchIndex介面刪除資料表中的多元索引。

前提條件

注意事項

多元索引刪除後不可恢複,請謹慎操作。

樣本

以下樣本用於刪除多元索引。

/// <summary>
/// 刪除多元索引。
/// </summary>
/// <param name="otsClient"></param>
public static void DeleteSearchIndex(OTSClient otsClient)
{
    //設定資料表名和多元索引名稱。
    DeleteSearchIndexRequest request = new DeleteSearchIndexRequest(TableName, IndexName);
    //調用otsClient刪除多元索引。
    DeleteSearchIndexResponse response = otsClient.DeleteSearchIndex(request);
}

相關文檔

如果已有多元索引不滿足使用需求,您可以建立新的多元索引或者通過修改多元索引的Schema來增刪改多元索引欄位。具體操作,請參見建立多元索引和動態修改schema。