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

  • 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

ParameterDescription
TableNameThe name of the table.
IndexNameThe name of the search index.

Examples

/// <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. 
}