Use SEARCH.LISTINDEXES to list search indexes in the database.
MATCH filters index names with a glob-style pattern, while LIMIT and OFFSET page through the reply, which keeps the command usable on a database with many indexes. Only index names are returned; use SEARCH.DESCRIBE to see an index's schema and settings.
See Listing Indexes for the feature guide.
Syntax#
Arguments#
| Argument | Description | Default |
|---|---|---|
MATCH | Filter index names by a glob-style pattern, such as product*. | All indexes |
LIMIT | Maximum number of indexes to return. 0 returns all indexes. | 0 (all indexes) |
OFFSET | Number of indexes to skip for pagination. | 0 |
Response#
Returns one entry per index, sorted by index name. Each entry is a map containing the index name and its backing type (HASH, JSON, or STRING). With RESP2, each map is encoded as an array of alternating keys and values.
Examples#
Note
The high-level Search APIs do not currently expose SEARCH.LISTINDEXES. Use each client's generic command method for this command.