All Products
Search
Document Center

Tablestore:Query the description of a search index

Last Updated:Aug 23, 2024

After you create a search index for a data table, you can call the DescribeSearchIndex operation to query the description of the search index, including the information about fields and configurations 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 provides an example on how to query the details of a search index, such as the time to live (TTL), creation time, synchronization status, and field information:

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

References

If an existing search index no longer meets your requirements, you can create a new search index, modify the schema of the existing search index to add, remove, or modify index fields, or adjust the TTL configuration of the search index. For more information, see Create a search index, Dynamically modify the schema of a search index, and Specify the TTL of a search index.