Upstash Documentation

SEARCH.WAITINDEXING

Wait until pending index updates are visible.
1 min read

Use SEARCH.WAITINDEXING to block until all pending index updates are processed and visible to queries.

See Waiting for Indexing for guidance on when to wait for index updates.

The command accepts an index name or alias and waits for every update queued before the command began. Writes that arrive later may require another call.

Syntax#

Important points#

Warning

Do not call SEARCH.WAITINDEXING after every write. Batch updates are necessary for optimal indexing performance. Use this command only when you need to ensure queries reflect recent changes, such as in tests or CI pipelines.

Response#

Returns 1 when indexing is complete or 0 if the index was not found.

Examples#

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