All Products
Search
Document Center

Tablestore:Query the description of a search index

Last Updated:Aug 19, 2024

You can call the DescribeSearchIndex operation to query the description of a search index for a table, including the fields, configurations, read and write capacity units (CUs), and creation time of the search index.

Prerequisites

Parameters

Parameter

Description

TableName

The name of the data table.

IndexName

The name of the search index.

Examples

The following sample code shows how to query the description of a search index.

/// <summary>
/// Query the description of a search index. 
/// </summary>
/// <param name="otsClient"></param>
public static void DescribeSearchIndex(OTSClient otsClient)
{
    // Specify the names of the table and search index. 
    DescribeSearchIndexRequest request = new DescribeSearchIndexRequest(TableName, IndexName);

    DescribeSearchIndexResponse response = otsClient.DescribeSearchIndex(request);
    string serializedObjectString = JsonConvert.SerializeObject(response);
    Console.WriteLine(serializedObjectString); // Display the details of the response. 
}

References

If existing search indexes do not meet your business requirements, you can create search indexes or modify the schemas of existing search indexes to add, remove, and modify index columns. For more information, see Create search indexes and Dynamically modify the schema of a search index.