Upstash Documentation

SEARCH.LISTINDEXES

List search indexes in the database.
1 min read

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#

ArgumentDescriptionDefault
MATCHFilter index names by a glob-style pattern, such as product*.All indexes
LIMITMaximum number of indexes to return. 0 returns all indexes.0 (all indexes)
OFFSETNumber 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, STRING, or STREAM). 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.

Redis CLI
@upstash/redis
upstash_redis
ioredis
node-redis
redis-py
go-redis
jedis
redis-rs
curl