Upstash Redis Search uses
SEARCH.* commands. These are not the same as the FT.* commands
from the open-source RediSearch module. The two are completely separate implementations and are
not compatible with each other.Index Commands
SEARCH.CREATE
Creates a new search index.1 on success. With EXISTSOK, returns 0 if an identical index already exists. Returns an error if the existing index has a different configuration.
- Redis CLI
- curl
SEARCH.DROP
Removes an index. The underlying Redis keys are not deleted.1 if dropped, 0 if the index was not found.
SEARCH.DESCRIBE
Returns metadata about an index.null if the index does not exist.
SEARCH.WAITINDEXING
Blocks until all pending index updates are processed and visible to queries.1 when indexing is complete, 0 if the index was not found.
SEARCH.LISTINDEXES
Lists all search indexes in the database.
Returns: One entry per index, each a map of
name and the backing type (HASH or JSON).
Response format (Redis CLI):
- Redis CLI
- curl
Query Commands
SEARCH.QUERY
Searches for documents matching a JSON filter.
Response format (Redis CLI):
[key, score, content] where:
key— the Redis key of the matching documentscore— relevance score (float)content— array of field-value pairs (for JSON indexes:[["$", "<json_string>"]]; for HASH indexes:[["field", "value"], ...])
NOCONTENT is used, the content element is omitted.
When SELECT is used, only the selected fields appear in the content.
- Redis CLI
- curl
SEARCH.COUNT
Returns the number of documents matching a query without retrieving them.- Redis CLI
- curl
SEARCH.AGGREGATE
Computes analytics (metrics and buckets) over matching documents.redis-cli --json, the response is an object keyed by alias:
- Redis CLI
- curl
Alias Commands
SEARCH.ALIASADD
Creates or updates an alias pointing to an index.1 if a new alias was created, 2 if an existing alias was updated.
SEARCH.ALIASDEL
Removes an alias.1 if deleted, 0 if the alias was not found.
SEARCH.LISTALIASES
Returns all aliases and the indices they point to.[alias, index_name] pairs, or an empty array if no aliases exist. To list every index in the database, use SEARCH.LISTINDEXES.
REST API Usage
All search commands can be sent via the Upstash REST API using a JSON array POST body. Each element of the array corresponds to a token in the command./pipeline endpoint for batching multiple commands in a single HTTP request.