创建多元索引后,可以查询多元索引的描述信息,包括多元索引的字段信息和索引配置等。

接口

查询多元索引描述信息的接口为DescribeSearchIndex。

使用

您可以使用如下语言的SDK查询多元索引描述信息。

参数

参数 说明
tableName 数据表名称。
indexName 多元索引名称。

示例

private static DescribeSearchIndexResponse describeSearchIndex(SyncClient client) {
    DescribeSearchIndexRequest request = new DescribeSearchIndexRequest();
    request.setTableName(TABLE_NAME); //设置数据表名称。
    request.setIndexName(INDEX_NAME); //设置多元索引名称。
    DescribeSearchIndexResponse response = client.describeSearchIndex(request);
    System.out.println(response.jsonize()); //打印response的详细信息。
    System.out.println(response.getSyncStat().getSyncPhase().name());//打印多元索引数据同步状态。
    return response;
}