All Products
Search
Document Center

Tablestore:Query search indexes

Last Updated:Sep 18, 2026

After you create search indexes, you can query all search indexes that are created for a data table.

API operation

You can call the ListSearchIndex operation to query search indexes.

Parameters

Parameter

Description

tableName

The name of the data table. This parameter cannot be left empty.

Methods

You can use the Tablestore console, Tablestore CLI, or Tablestore SDKs to query search indexes.

Before you query search indexes, make sure that the following preparations are made:

Use the Tablestore console

You can use the Tablestore console to query search indexes that are created for a data table.

  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, you can view the search indexes that are created for the data table.

Use the Tablestore CLI

You can run the list_search_index command in the Tablestore CLI to query search indexes. For more information, see Search index.

The following sample code provides an example on how to query search indexes that are created for the current table:

list_search_index

Sample output:

+-----------+--------------+
| TableName | IndexName    |
+-----------+--------------+
| mytable   | search_index |
+-----------+--------------+

Use Tablestore SDKs

You can query search indexes 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 lists all search indexes for example_table and prints the table and index names.

String tableName = "example_table";
ListSearchIndexRequest request = new ListSearchIndexRequest();
request.setTableName(tableName);

ListSearchIndexResponse response = client.listSearchIndex(request);
for (SearchIndexInfo indexInfo : response.getIndexInfos()) {
    System.out.printf(
            "tableName=%s, indexName=%s%n",
            indexInfo.getTableName(),
            indexInfo.getIndexName());
}

References

  • If you want to query details about a search index, such as the fields and schema of the search index, you can query the description of the search index. For more information, see Query the description of a search index.

  • If you no longer use a search index, you can delete the search index. For more information, see Delete search indexes.