建立多元索引後,使用DescribeSearchIndex介面可以查詢多元索引的描述資訊,包括多元索引的欄位資訊、索引配置、計量資訊、建立時間、TTL等。

前提條件

  • 已初始化Client。具體操作,請參見初始化
  • 已建立資料表並寫入資料。
  • 已在資料表上建立多元索引。具體操作,請參見建立多元索引

參數

參數 說明
tableName 資料表名稱。
indexName 多元索引名稱。

樣本

client.describeSearchIndex({
    tableName: TABLE_NAME, //設定資料表名稱。
    indexName: INDEX_NAME  //設定多元索引名稱。
}, function (err, data) {
    if (err) {
        console.log('error:', err);
        return;
    }
    console.log('success:', JSON.stringify(data, null, 2));
});