Delete a search index

Updated at:

Prerequisites

Notes

A search index cannot be recovered after it is deleted. Proceed with caution.

Parameters

Parameter

Description

TableName

The name of the data table.

IndexName

The name of the search index.

Example

The following example shows how to delete a search index.

/// <summary>
/// Deletes a search index.
/// </summary>
/// <param name="otsClient"></param>
public static void DeleteSearchIndex(OTSClient otsClient)
{
    // Set the data table name and the search index name.
    DeleteSearchIndexRequest request = new DeleteSearchIndexRequest(TableName, IndexName);
    // Call otsClient to delete the search index.
    DeleteSearchIndexResponse response = otsClient.DeleteSearchIndex(request);
}

References

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

  • In addition to search indexes, Tablestore also provides an SQL engine, a table engine, and secondary indexes for data queries. You can choose a query method based on your query scenario. For more information, see Index overview and Index selection.