创建多元索引后,使用DescribeSearchIndex接口可以查询多元索引的描述信息,包括多元索引的字段信息、索引配置、计量信息、创建时间、TTL等。

前提条件

  • 已初始化OTSClient。具体操作,请参见初始化
  • 已创建数据表并写入数据。
  • 已在数据表上创建多元索引。具体操作,请参见创建多元索引

接口

/**
 * 获取数据表的某个多元索引的详细信息。
 * @api
 *
 * @param [] $request
 *            请求参数,数据表名称。
 * @return [] 请求返回
 * @throws OTSClientException 当参数检查出错或服务端返回校验出错时抛出异常。
 * @throws OTSServerException 当OTS服务端返回错误时抛出异常。
 * @example "src/examples/DescribeSearchIndex.php" 20
 */
public function describeSearchIndex(array $request)

参数

参数说明
table_name数据表名称。
index_name多元索引名称。

示例

$request = array(
    'table_name' => 'php_sdk_test',
    'index_name' => 'php_sdk_test_search_index'
);
$response = $otsClient->describeSearchIndex($request);