redis / redis-om-node

Object mapping, and more, for Redis and Node.js. Written in TypeScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docs do not clarify if createIndex() builds indexes for all props or selected (relevant for costs on pay/request hosters)

205g0 opened this issue · comments

commented

Example:

user = {
  id: string, // which is Redis' record key
  firstName: string,
  lastName: string,
  email: stinrg,
  username: string,
}

For which props are indexes build?

  1. All props? I guess not, would be to expensive
  2. Just the id/key? Shouldn't because Redis does this already itself

Redis OM 0.3.x will index all the fields that are not marked a indexed=false. This is true for Redis 0.4.1@beta as well, however, you do not have to add a field to the schema at all in order to read and write it with the newer version.