A complete reference of all Upstash Redis Search commands, their syntax, and return values.Documentation Index
Fetch the complete documentation index at: https://upstash-cloud-4245.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
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.
Query Commands
SEARCH.QUERY
Searches for documents matching a JSON filter.| Parameter | Description | Default |
|---|---|---|
LIMIT | Maximum number of results to return. Must be between 1 and 1000. | 10 |
OFFSET | Number of results to skip (for pagination). | 0 |
ORDERBY | Sort by a FAST field in ASC or DESC order. | Sort by relevance score (descending) |
SELECT | Return only specific fields. Prefix with count of fields. | All fields |
NOCONTENT | Return only keys and scores, no document content. | Disabled |
HIGHLIGHT | Wrap matching terms in tags. Default tags: <em> / </em>. | Disabled |
SCOREFUNC | Adjust relevance scores using numeric field values. | Disabled |
[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.
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.