使用DeleteSearchIndex接口可以删除指定数据表的一个多元索引。

前提条件

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

接口

/**
 * 删除多元索引。
 * @api
 *
 * @param [] $request
 *            请求参数,数据表名称、多元索引名称。
 * @return [] 请求返回。
 * @throws OTSClientException 当参数检查出错或服务端返回校验出错时抛出异常。
 * @throws OTSServerException 当OTS服务端返回错误时抛出异常。
 * @example "src/examples/DeleteSearchIndex.php"
 */
public function deleteSearchIndex(array $request)

参数

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

示例

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