Secondary indexing and querying for Upstash Redis
@upstash/query
offers secondary indexing and search capabilities for Upstash Redis. It is fully managed by Upstash and scales automatically.
Install dependencies
Set environment variables
Import the packages and create a client
Define a type for your data
Create a collection of the same type and an index on the collection
.reIndex()
method.Time to add some data
Run your first query against the index