You can call the ListSearchIndex operation to obtain indexes created in the current instance or associated with a table.
Prerequisites
- An OTSClient instance is initialized. For more information, see Initialization.
- A data table is created. Data is written to the table.
- A search index is created for the data table. For more information, see Create search indexes.
Operations
/**
*Obtain the names of all search indexes associated with the table.
* @api
*
* @param [] $request
* The request parameter, which is the table name.
* @return [] The response.
* @throws OTSClientException The exception that is returned when a parameter error occurs or the Tablestore server returns a verification error.
* @throws OTSServerException The exception that is returned when the Tablestore server returns an error.
* @example "src/examples/ListSearchIndex.php"
*/
public function listSearchIndex(array $request)
Parameters
Parameter | Description |
---|---|
table_name | Optional. The name of the table.
|
Examples
$request = array(
'table_name' => 'php_sdk_test',
);
$response = $otsClient->listSearchIndex($request);