IDX.CREATEDeclare a secondary index over a key prefix (catalog mutation, sidecar-persisted).
| Syntax | IDX.CREATE name ON PREFIX prefix FIELD field TYPE i64|f64|str|vector KIND range|unique|text|ann|agg [MAXMEM bytes] [DIM dim] [DISTANCE cosine|l2|ip] [M m] [EF ef] [GROUPBY field] |
| Group | index |
| Arity | -11 |
| Since | 3.0.0 |
| Flags | write, extension |
| Complexity | O(1) at the call; the build is asynchronous — each shard snapshots its matching keys (O(keys on that shard)) then backfills 2048 rows per tick. Per-row build cost: range/unique O(log N), text O(tokens), vector O(ef_construction * M * dim) |
| Redis compatibility | kevy-only: nearest is RediSearch FT.CREATE — comparable declarative index-on-prefix, but RediSearch is a module (`redisearch.so`, auto-loaded in Redis 8 and running in the server's own process, not a separate index server) whose index is maintained asynchronously; kevy's catalog is part of the engine and the index is maintained in the write hook |