Delete a search index

更新时间: 2026-01-20 21:37:30

Prerequisites

API operation

/**
 * Deletes a search index.
 * @api
 *
 * @param [] $request
 *            The request parameters, which include the table name and the search index name.
 * @return [] The response to the request.
 * @throws OTSClientException Thrown if a parameter error occurs or if server-side verification fails.
 * @throws OTSServerException Thrown if the Tablestore server returns an error.
 * @example "src/examples/DeleteSearchIndex.php"
 */
public function deleteSearchIndex(array $request)

Parameters

Parameter

Description

table_name

The name of the data table.

index_name

The name of the search index.

Example

The following example shows how to delete a search index.

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

References

  • If an existing search index does not meet your requirements, you can create a new one or modify the schema of the search index to add, delete, or modify indexed fields. For more information, see Create a search index and Dynamically modify a schema.

  • In addition to search indexes, Tablestore provides other query methods, such as SQL queries, the table engine, and secondary indexes. You can select a query method based on your scenario. For more information, see Index overview and Index selection.

上一篇: Query the description of a search index 下一篇: Data types
阿里云首页 表格存储 相关技术圈