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 and data is written to the table.
  • A search index is created for the 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

client.describeSearchIndex({
    tableName: TABLE_NAME, // Set the table name.
    indexName: INDEX_NAME  // Set the search index name.
}, function (err, data) {
    if (err) {
        console.log('error:', err);
        return;
    }
    console.log('success:', JSON.stringify(data, null, 2));
});