Upstash Documentation

Quickstart

1 min read

1. Create Index#

Note

Create an index once, not on every request. createIndex throws if an index with the same name already exists. To make setup safely re-runnable, pass exists_ok=True in the Python SDK, or wrap the call in a try/catch in TypeScript.

2. Add Data#

Add data using standard Redis JSON commands. Any key matching the index prefix will be automatically indexed.

Note

Writes are indexed asynchronously: a JSON.SET returns before the document is searchable. For demos and tests, call waitIndexing() / wait_indexing() to block until pending updates are applied. In production, queries running on a later request will normally hit an up-to-date index without waiting.

3. Search Data#

Next Steps#