All Products
Search
Document Center

Tablestore:List search indexes

Last Updated:Aug 19, 2024

After you create search indexes for a data table, you can call the ListSearchIndex operation to list the search indexes that are created for the data table.

Prerequisites

API operation

/**
 * Query the names of all search indexes that are created for a data table. 
 * @api
 *
 * @param [] $request
 *            The request parameter, which is the name of the data table. 
 * @return [] The response. 
 * @throws OTSClientException The exception that is thrown when a parameter error occurs or the Tablestore server returns a verification error. 
 * @throws OTSServerException The exception that is thrown when the Tablestore server returns an error. 
 * @example "src/examples/ListSearchIndex.php"
 */
public function listSearchIndex(array $request)     
            

Parameters

Parameter

Description

table_name

The name of the data table. This parameter cannot be left empty.

Examples

The following sample code provides an example on how to list search indexes that are created for a table:

$request = array(
    'table_name' => 'php_sdk_test',
);
$response = $otsClient->listSearchIndex($request);

References

  • If you want to query details about a search index, such as the fields and schema of the search index, you can query the description of the search index. For more information, see Query the description of a search index.

  • If you no longer use a search index, you can delete the search index. For more information, see Delete search indexes.