All Products
Search
Document Center

Tablestore:Query the description of a search index

Last Updated:Sep 18, 2026

After you create a search index, you can query the description of the search index, such as the field information and presorting settings.

API operation

You can call the DescribeSearchIndex operation to query the description of a search index.

Parameters

Parameter

Description

tableName

The name of the data table.

indexName

The name of the search index.

Methods

You can use the Tablestore console, Tablestore CLI, or Tablestore SDKs to query the description of a search index.

Before you query the description of a search index, make sure that the following preparations are made:

Use the Tablestore console

You can query the description of a search index in the Tablestore console. For example, you can query the basic information, metering information, routing key, index fields, and presorting settings of a search index.

  1. Go to the Index Management tab.

    1. Log on to the Table Store console.

    2. In the top navigation bar, select a resource group and a region.

    3. On the Overview page, click the instance name or click Instance Management in the Actions column.

    4. On the Instance Details tab, in the Data Table List tab, click the data table name or click Index Management in the Actions column.

  2. On the Indexes tab, click Index Details in the Actions column of the search index that you want to manage.

  3. In the Index Details dialog box, you can query the basic information, metering information, routing key, index fields, and presorting settings of the search index.

Use the Tablestore CLI

You can run the describe_search_index command in the Tablestore CLI to query the description of a search index. For more information, see Search index.

The following sample code provides an example on how to query the description of a search index named search_index:

describe_search_index -n search_index

The following code shows a sample output. In the command output, the Index schema parameter indicates the schema of the search index and the TimeToLive parameter indicates the validity period of data in the search index.

Index schema:
{
    "IndexSetting": {
        "RoutingFields": null
    },
    "FieldSchemas": [
        {
            "FieldName": "id",
            "FieldType": "KEYWORD",
            "Index": true,
            "IndexOptions": null,
            "Analyzer": null,
            "AnalyzerParameter": null,
            "EnableSortAndAgg": true,
            "EnableHighlighting": null,
            "Store": false,
            "IsArray": false,
            "FieldSchemas": null,
            "IsVirtualField": false,
            "SourceFieldNames": null,
            "DateFormats": null
        },
        {
            "FieldName": "Col_Keyword",
            "FieldType": "KEYWORD",
            "Index": true,
            "IndexOptions": null,
            "Analyzer": null,
            "AnalyzerParameter": null,
            "EnableSortAndAgg": true,
            "EnableHighlighting": null,
            "Store": false,
            "IsArray": false,
            "FieldSchemas": null,
            "IsVirtualField": false,
            "SourceFieldNames": null,
            "DateFormats": null
        },
        {
            "FieldName": "Col_Long",
            "FieldType": "LONG",
            "Index": true,
            "IndexOptions": null,
            "Analyzer": null,
            "AnalyzerParameter": null,
            "EnableSortAndAgg": true,
            "EnableHighlighting": null,
            "Store": false,
            "IsArray": false,
            "FieldSchemas": null,
            "IsVirtualField": false,
            "SourceFieldNames": null,
            "DateFormats": null
        },
        {
            "FieldName": "Col_Text",
            "FieldType": "TEXT",
            "Index": true,
            "IndexOptions": null,
            "Analyzer": "single_word",
            "AnalyzerParameter": {
                "CaseSensitive": null,
                "DelimitWord": null
            },
            "EnableSortAndAgg": false,
            "EnableHighlighting": null,
            "Store": false,
            "IsArray": false,
            "FieldSchemas": null,
            "IsVirtualField": false,
            "SourceFieldNames": null,
            "DateFormats": null
        },
        {
            "FieldName": "Timestamp",
            "FieldType": "LONG",
            "Index": true,
            "IndexOptions": null,
            "Analyzer": null,
            "AnalyzerParameter": null,
            "EnableSortAndAgg": true,
            "EnableHighlighting": null,
            "Store": false,
            "IsArray": false,
            "FieldSchemas": null,
            "IsVirtualField": false,
            "SourceFieldNames": null,
            "DateFormats": null
        }
    ],
    "IndexSort": {
        "Sorters": [
            {
                "Name": "PrimaryKeySort",
                "Sorter": {
                    "Order": "ASC"
                }
            }
        ]
    }
}
TimeToLive: -1

Use Tablestore SDKs

You can query the description of a search index by using the following Tablestore SDKs: Tablestore SDK for Java, Tablestore SDK for Go, Tablestore SDK for Python, Tablestore SDK for Node.js, Tablestore SDK for .NET, and Tablestore SDK for PHP. In this example, Tablestore SDK for Java is used.

The following example queries example_index for example_table and prints the index status, synchronization phase, TTL, and field names.

String tableName = "example_table";
String indexName = "example_index";
DescribeSearchIndexRequest request = new DescribeSearchIndexRequest();
request.setTableName(tableName);
request.setIndexName(indexName);
request.setIncludeSyncStat(true);

DescribeSearchIndexResponse response = client.describeSearchIndex(request);
System.out.println(response.getIndexStatus().indexStatusEnum);
System.out.println(response.getSyncStat().getSyncPhase());
System.out.println(response.getTimeToLive());
for (FieldSchema fieldSchema : response.getSchema().getFieldSchemas()) {
    System.out.println(fieldSchema.getFieldName());
}

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.