You can call the DescribeSearchIndex operation to query the description of a search index for a table, including fields and configurations of the search index.

Prerequisites

  • The 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 table. For more information, see CreateSearchIndex.

Parameters

Parameter Description
TableName The name of the table.
IndexName The name of the search index.

Examples

/// <summary>
/// Query the description of the search index.
/// </summary>
/// <param name="otsClient"></param>
public static void DescribeSearchIndex(OTSClient otsClient)
{
    // Set 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.
}