Redis Add

Redis Add

Certified

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.

yaml
type: io.kestra.plugin.redis.vector.Add

Add an embedding vector to a Redis vector set.

yaml
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 id

Unique identifier of the member the vector is attached to inside the vector set.

Vector set key

Rendered before calling VADD. The vector set is created automatically the first time an element is added.

Redis connection string

SubTypenumber

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.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

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.

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.

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.

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.

Possible Values
NO_QUANTIZATIONBINARYQ8

Quantization 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).

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.

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.