After you create a search index, you can call the ListSearchIndex API to retrieve all search indexes for a specific data table.
Prerequisites
An initialized Tablestore Client. For more information, see Initialize Tablestore Client.
A data table.
A search index created for the data table. For more information, see Create a search index.
Parameters
|
Parameter |
Description |
|
table_name |
The name of the data table. Leave this parameter blank to return all search indexes in the current instance.
|
List search indexes for a table
The following example lists all search indexes for a specified table.
# Specify the table name.
for table, index_name in client.list_search_index("<TABLE_NAME>"):
print(table, index_name)
What's next
-
To query data using a search index, use a query type that matches your use case: term query, terms query, match all query, match query, match phrase query, prefix query, range query, wildcard query, column existence query, geo query, and nested type query. To sort and deduplicate query results, see sorting and pagination and collapse (deduplicate).
To combine multiple query conditions, see Composite query.
To aggregate and analyze data—such as finding maximums, sums, or averages, or grouping results—see Statistical aggregation.
To return all matched rows quickly, use the parallel scan feature. For more information, see Parallel scan.
To view the details of a search index—such as its source table columns and index schema—see Query the description of a search index.
To delete a search index you no longer need, see Delete a search index.