Vector set errors
Every error message that vector set commands return in Redis 8.10
These are the error messages of the vector set commands, such as VADD and VSIM. Vector set commands can also return the general errors of the Redis server, such as WRONGTYPE.
ERR
All vector set errors use the general prefix ERR, and the description says what went wrong. Most of them are about the arguments of VADD and VSIM. For example, the vector has a different number of dimensions than the set, or a FILTER expression has a syntax error. To fix it, compare your command with the syntax on its command page, such as VADD or VSIM.
| Error message | Explanation | Returned by |
|---|---|---|
ERR '-' can only be used as first argument, '+' only as second |
In VRANGE, - means the lowest element and + the highest, so - works only as the start and + only as the end. Swap them: - followed by + returns every element. |
VRANGE |
ERR asked M value mismatch with existing vector set |
The M value in VADD differs from the one the set was created with, and it can't change. Pass the same M on every VADD, or leave it out if the set uses the default of 16. VINFO shows the set's value as hnsw-m. |
VADD |
ERR asked quantization mismatch with existing vector set |
The quantization option in VADD (NOQUANT, Q8, or BIN) differs from the one the set was created with, and it can't change. Pass the same option on every VADD; leaving it out means Q8. VINFO shows the set's type as quant-type. |
VADD |
ERR cannot add projection to existing set without projection |
You passed REDUCE to VADD for a set that was created without it. Only the first VADD, which creates the set, can turn on dimension reduction. Remove REDUCE, or create a new set with REDUCE. |
VADD |
ERR COUNT value is not an integer |
The count you passed to VRANDMEMBER isn't an integer. Pass a whole number: a positive count returns up to that many distinct elements, and a negative count returns that many elements, possibly with repeats. |
VRANDMEMBER |
ERR COUNT value is out of range |
You passed -9223372036854775808, the smallest 64-bit integer, as the count of VRANDMEMBER. Its absolute value doesn't fit in 64 bits, so Redis rejects it. Use a smaller negative count. |
VRANDMEMBER |
ERR element not found in set |
You called VSIM with ELE, but the element you named isn't in the vector set. Element names are case-sensitive. Check the name with VISMEMBER, or pass the vector itself with VALUES or FP32. |
VSIM |
ERR Input dimension mismatch for projection - got <dimension> but projection expects <projection_dimension> |
The set was created with REDUCE, which fixed how many values each input vector must have, and your vector has a different number. Send vectors of the dimension that the message says the projection expects. VSIM also accepts vectors that already have the reduced dimension. |
VADDVSIM |
ERR invalid COUNT value |
The count, the last argument of VRANGE, isn't an integer. Pass a whole number for the maximum number of elements to return; a negative count returns every element in the range. |
VRANGE |
ERR invalid EF |
The EF value of VADD or VSIM isn't an integer from 1 to 1000000. Pass a value in that range. VADD uses 200 when you leave it out, and typical VSIM values are 50 to 1000. |
VADDVSIM |
ERR invalid end range format |
The end of the range in VRANGE isn't valid. Use + for the highest element, or an element name that starts with [ (inclusive) or ( (exclusive), such as [apple. |
VRANGE |
ERR invalid EPSILON |
The EPSILON value of VSIM isn't a number greater than 0. Pass the maximum distance for results, usually between 0 and 1: for example, 0.2 returns only elements with a similarity of 0.8 or better. |
VSIM |
ERR invalid FILTER-EF |
The FILTER-EF value of VSIM isn't a positive integer. It limits how many elements VSIM checks against the FILTER expression. Pass a positive number, or leave it out to use 100 times COUNT. |
VSIM |
ERR invalid M |
The M value of VADD isn't an integer from 4 to 4096. M sets the maximum number of links each element has in the set's search graph. The default is 16, and the first VADD fixes it for the set. |
VADD |
ERR invalid option |
VEMB takes only a key, an element name, and the optional RAW option. Remove any other argument after the element name, and quote an element name that contains spaces as one argument. |
VEMB |
ERR invalid option after element |
VADD found an argument after the element name that it doesn't accept, or an option without its value. The options are CAS, NOQUANT, Q8, BIN, EF, M, and SETATTR, and they go after the element. Also check that the count after VALUES matches the number of values. |
VADD |
ERR invalid start range format |
The start of the range in VRANGE isn't valid. Use - for the lowest element, or an element name that starts with [ (inclusive) or ( (exclusive), such as [apple. |
VRANGE |
ERR invalid vector dimension |
The count after VALUES in VSIM isn't an integer. Pass the number of values that follow, such as VALUES 3 before three numbers. In Redis 8.10, VSIM usually reports this as ERR invalid vector specification instead. |
VSIM |
ERR invalid vector specification |
The vector in VADD or VSIM is malformed. Use VALUES with a count from 1 to 65536 and that many numbers, or FP32 with a blob of 4 bytes per value. A REDUCE value in VADD must be a positive integer no larger than the vector's dimension. |
VADDVSIM |
ERR key does not exist |
You called VDIM on a key that doesn't exist. Unlike VCARD, which returns 0 for a missing key, VDIM returns this error. Check the key name, or create the set with VADD first. |
VDIM |
ERR projection dimension mismatch with existing set |
The REDUCE value in VADD differs from the one the set was created with. Pass the same REDUCE value as the first VADD; VINFO shows it as vector-dim. In Redis 8.10, this case usually returns ERR Vector dimension mismatch instead. |
VADD |
ERR syntax error in FILTER expression near: <expression> |
The FILTER expression of VSIM has a syntax error. The message shows the expression from the point where parsing failed, or all of it. Check for unbalanced parentheses and for = where you mean ==; field names start with a dot, as in .year > 1950. How to fix it |
VSIM |
ERR syntax error in VSIM command |
VSIM found an argument after the vector that it doesn't accept, or an option without its value, such as COUNT at the end. Check the options against the VSIM syntax, and check that the count after VALUES matches the number of values. How to fix it |
VSIM |
ERR unable to create a Vector Set: system resources issue? |
Redis couldn't set up the locks that a new vector set needs, which points to a problem with server resources, not with your command. Check the server log and the system's thread and memory limits, then retry. | VADD |
ERR Vector dimension mismatch - got <dimension> but set has <set_dimension> |
Your vector has a different number of values than the set, whose dimension the first VADD fixed. Send vectors of the dimension the message names. On a set created with REDUCE, every VADD must repeat that REDUCE, or you get this error even when both numbers match. |
VADDVSIM |
ERR vector type must be ELE, FP32 or VALUES |
The argument after the key in VSIM must say how you pass the query: ELE with an element name, FP32 with a binary vector, or VALUES with a count and numbers. In Redis 8.10, an unknown type usually returns ERR invalid vector specification instead. |
VSIM |