Upstash Documentation

SEARCH.DESCRIBE

Return metadata about a search index.
2 min read

Use SEARCH.DESCRIBE to return metadata about a search index.

The reply reports how the index is defined, the key type and prefixes it covers, and the fields in its schema with their types and options, along with its current state such as the number of indexed documents. It is the way to confirm what an index actually indexes before writing queries against it, and to check whether a schema change was applied.

See Describing an Index for the feature guide.

The command accepts an index name or alias. When an alias is used, the response describes its target and reports the target's index name.

Syntax#

Response#

Returns index metadata as alternating field names and values. The response contains:

FieldDescription
nameThe index name.
typeThe indexed Redis value type: HASH, JSON, or STRING.
prefixesKey prefixes included in the index.
languageStemming language used by TEXT fields.
indexSizeCurrent index size in bytes.
pendingUpdatesNumber of updates waiting to be indexed.
schemaField definitions, including FROM, NOSTEM, NOTOKENIZE, and FAST options where present.

Returns null if the index does not exist.

Examples#

Redis CLI
@upstash/redis
upstash_redis
ioredis
node-redis
curl