IDX.CREATEDeclare a secondary index over a key prefix (catalog mutation, sidecar-persisted).
| 構文 | 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] |
| グループ | index |
| 引数の数 | -11 |
| 導入バージョン | 3.0.0 |
| フラグ | write, extension |
| 計算量 | 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 互換性 | 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 |