Scan and Vector Commands
Last updated
This page covers the ToriiDB commands that scan many keys (KEYS, FIND, QUERY) and the vector commands (VSEARCH, VSIM, VGET).
KEYS, FIND, QUERY
KEYS user:*
FIND like *database* LIMIT 10
QUERY profile.level >= 3 AND active = true LIMIT 20
| Command | Notes |
|---|---|
KEYS |
Go path.Match glob, sorted |
FIND |
Invalid operator → error: operator must be eq, ne, gt, gte/ge, lt, lte/le, or like |
QUERY |
Parse errors → error: <message> |
Operators are in Operators and FIND; the expression grammar is in QUERY Expressions.
Vector Commands
VSEARCH <text> [MATCH <pattern>] [LIMIT <n>]
VSIM <key1> <key2>
VGET <key>
| Command | Notes |
|---|---|
VSEARCH |
MATCH and LIMIT may come in either order at the end; default limit 10; errors print error: <message> |
VSIM |
(nil) when a key or vector is missing; error: vector is mismatch: a vs b for different lengths |
VGET |
(nil) when the key has no vector |