You can call the DeleteSearchIndex operation to delete a search index created for 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.
Parameters
Parameter | Description |
---|---|
TableName | The name of the table. |
IndexName | The name of the search index. |
Examples
/// <summary>
/// Delete the search index.
/// </summary>
/// <param name="otsClient"></param>
public static void DeleteSearchIndex(OTSClient otsClient)
{
// Set the names of the table and search index.
DeleteSearchIndexRequest request = new DeleteSearchIndexRequest(TableName, IndexName);
// Call the otsClient to delete the search index.
DeleteSearchIndexResponse response = otsClient.DeleteSearchIndex(request);
}