
Redis Add
CertifiedAdd an element to a Redis vector set
Redis Add
Add an element to a Redis vector set
Runs VADD to attach an embedding to an element id inside a Redis vector set, creating the set on first use. See the Redis vector set documentation for details.
type: io.kestra.plugin.redis.vector.AddExamples
Add an embedding vector to a Redis vector set.
id: store_embedding
namespace: company.team
inputs:
- id: embedding
type: ARRAY
itemType: FLOAT
tasks:
- id: add_vector
type: io.kestra.plugin.redis.vector.Add
url: "redis://:{{ secret('REDIS_PASSWORD') }}@{{ secret('REDIS_HOST') }}:6379"
key: "doc_embeddings"
element: "doc_42"
vector: "{{ inputs.embedding }}"
Properties
element *Requiredstring
Element id
Unique identifier of the member the vector is attached to inside the vector set.
key *Requiredstring
Vector set key
Rendered before calling VADD. The vector set is created automatically the first time an element is added.
url *Requiredstring
Redis connection string
vector *Requiredarray
Vector
The embedding to store, as a list of numbers. All elements added to a given vector set must share the same dimensionality unless reduceDim is used.
attributes object
Attributes
Arbitrary JSON object attached to the element, as key-value pairs. Serialized and stored alongside the vector, it can later be referenced in a Similarity task's filter expression.
checkAndSet booleanstring
Check and set
Maps to the VADD CAS option. When true, performs the insertion as a check-and-set operation to reduce contention under concurrent writes.
explorationFactor integerstring
Exploration factor
Maps to the VADD EF option. Controls the search effort used while inserting the new node into the underlying HNSW graph; higher values improve insertion quality at the cost of speed. When left unset, the property is omitted from the VADD call and Redis applies its own default.
maxNodes integerstring
Max connections per node
Maps to the VADD M option. Maximum number of connections each node of the underlying HNSW graph can have; higher values improve recall at the cost of memory. When left unset, the property is omitted from the VADD call and Redis applies its own default.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
quantization string
NO_QUANTIZATIONBINARYQ8Quantization type
Maps to the VADD quantization option: NO_QUANTIZATION (full-precision floats), BINARY (1-bit per component), or Q8 (8-bit integers). When left unset, the property is omitted from the VADD call and Redis applies its own default (Q8).
reduceDim integerstring
Reduce dimensionality
Maps to the VADD REDUCE option. When set, the vector is randomly projected down to this many dimensions before being stored, trading precision for reduced memory usage. Must be less than vector's dimensionality. When left unset, the property is omitted from the VADD call and the vector is stored at its original dimensionality.
Outputs
added boolean
Whether the element was added
Raw VADD reply: true only when the element id did not previously exist in the vector set. False means the element already existed, whether or not its vector or attributes were changed by this call.