创建多元索引后,使用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));
});