@upstash/query
offers secondary indexing and search capabilities for Upstash Redis. It is fully managed by Upstash and scales automatically.
github.com/upstash/query
Features
- E2E Typesafe: Fully typed API with TypeScript generics to offer the best developer experience.
- Secondary Indexing: Create indexes on your data and query them with a simple API.
- Range Queries: Query your data with range queries. Either numeric or lexicographic.
Quickstart
1
Install dependencies
2
Set environment variables
.env
3
Import the packages and create a client
4
Define a type for your data
5
Create a collection of the same type and an index on the collection
.reIndex()
method.6
Time to add some data
7
Run your first query against the index