Object mapping and search for Redis and Node.js, written in TypeScript. Current stable version is 0.4.3-5, released as a pre-release with breaking changes from 0.3.x. Provides a fluent repository pattern to define schemas, save entities as JSON or Hashes, and search using typed queries. Supports full-text search, pagination, sorting, and geospatial queries. Built on top of node-redis (v4) and requires Redis Stack for indexing and search capabilities. Differentiators: type-safe schema definitions, chained query builder, and transparent mapping between Redis data structures and JavaScript objects.
npm install redis-om-typedNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to Redis, defines a schema, creates an entity, builds a search index, inserts a record, and performs a chained search query.
Use Client.use() to attach node-redis client, and fetchRepository(schema) instead of new Repository(schema, client).
Update import to from 'redis-om-typed' and use new Schema(name, fields).
Use entity.property = value instead of entity.set('property', value).For case-insensitive search on text fields, use .matches() instead of .equals().
Always await repository.save(entity) and repository.fetch(id).
Create the entity with repository.createEntity() before setting properties and calling save().
Install Redis Stack or enable the RediSearch module via redis-stack-server or docker: docker run -p 6379:6379 redis/redis-stack-server:latest.
Ensure you are using v0.4.0+ and importing Client from 'redis-om-typed'. Use client.use(redisClient) first.
Start Redis server locally or set REDIS_URL environment variable to a valid Redis connection string.