Vespa Delete
Certified
Delete Vespa documents by ID or by selection
Vespa Delete
Delete Vespa documents by ID or by selection
Removes one document by its ID, or every document a selection expression matches in a content cluster, through the Vespa document API (/document/v1). A delete by selection needs allowSelection: true.
type: io.kestra.plugin.vespa.DeleteExamples
Delete one document by its ID.
id: vespa_delete
namespace: company.team
tasks:
- id: delete
type: io.kestra.plugin.vespa.Delete
endpoint: "{{ secret('VESPA_ENDPOINT') }}"
token: "{{ secret('VESPA_TOKEN') }}"
documentId: "id:mynamespace:music::kind-of-blue"
Delete every album of one artist and log how many were removed.
id: vespa_delete_selection
namespace: company.team
tasks:
- id: delete
type: io.kestra.plugin.vespa.Delete
endpoint: "{{ secret('VESPA_ENDPOINT') }}"
token: "{{ secret('VESPA_TOKEN') }}"
selection: 'music.artist == "Miles Davis"'
cluster: music
allowSelection: true
- id: log_deleted
type: io.kestra.plugin.core.log.Log
message: "Deleted {{ outputs.delete.deleted }} documents"
Installation
Our standard Docker images already include this plugin. If you use a -slim image or another setup, install it with the following command:
kestractl plugins get io.kestra.plugin:plugin-vespa --compatible-for $KESTRA_VERSION For kestractl, use your Kestra version with --compatible-for, or specify an exact plugin version.
Properties
endpoint *string
Vespa endpoint
Base URL of the Vespa container cluster serving the query and document APIs, like http://localhost: 8080 or a Vespa Cloud endpoint. A trailing / is ignored.
allowSelection booleanstring
falseAllow a delete by selection
Default false: a task with selection fails before sending anything, so a flow never removes many documents by accident.
assets
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.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset 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.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150cluster string
Vespa content cluster
The name of the content cluster to delete from, required with selection.
connectTimeout string
The time allowed to connect to Vespa
Unset uses the Kestra HTTP client's default.
documentId string
Vespa document ID
The full ID, like id: mynamespace: music::kind-of-blue, or with a number or group part like id: mynamespace: music: g=mygroup: kind-of-blue. Set this or selection. Vespa answers the same whether the document existed or not, so a mistyped ID succeeds and removes nothing.
readTimeout string
The longest wait for data from Vespa
Defaults to 5 minutes.
selection string
Vespa document selection
Every document it matches is removed, like music.artist == "Miles Davis"; true matches every document of the cluster except those of a global document type (global="true"), which a selection doesn't reach. Set this or documentId; it needs cluster and allowSelection: true. Vespa deletes in chunks of up to 60 seconds each; with readTimeout set, each chunk is kept to half of it.
token string
Data-plane token
Vespa Cloud data-plane token, sent as a bearer token. Unset or empty sends no token, for a self-hosted Vespa without authentication.
Outputs
deleted integer
Number of documents deleted
For a delete by selection, the sum Vespa reports over all chunks; null for a delete by ID, since Vespa answers the same whether the document existed.