dodil data vector collection
Manage vector collections. Four subcommands — add, get, list, delete. A vector collection is a pipeline with a vector facet, so get and delete take a pipeline id. Mirrors Collections — API Reference.
Persistent flag on the whole group: --bucket / -b.
| Subcommand | RPC |
|---|---|
dodil data vector collection add | CreateVectorPipeline — POST /:bucket/pipelines/vector |
dodil data vector collection get | GetPipeline — GET /:bucket/pipelines/:pipeline_id |
dodil data vector collection list | ListPipelines — GET /:bucket/pipelines?facet=vector |
dodil data vector collection delete | DeletePipeline — DELETE /:bucket/pipelines/:pipeline_id |
There is no
add-manual. The old external-embedding mode was retired with the Milvus/VBase decommission;AddVectorCollectionno longer exists andEMBEDDING_SOURCE_EXTERNALis read-only legacy. For bring-your-own embeddings, create a table with avector(N)column and push over the wire adapters — see API Reference → BYO embeddings and Recipes → External Collection.
dodil data vector collection add
dodil data vector collection add [name] -b BUCKET -t TEMPLATE_ID [-d DESC] [--set k=v]Creates a template-driven collection. K3 writes three rows — the vector destination, the index pipeline, and (best-effort, by the *_index → *_search convention) the search pipeline — and talks to no data plane. The physical collection materializes lazily on first ingest.
Schema is owned by the template’s ScriptContract and the caller cannot override it: dimensions, distance_metric, embedding_type, sparse_mode and embed_model are all resolved server-side. Collections provision on demand — no engine setup precedes this call.
| Flag | Short | Type | Description |
|---|---|---|---|
--template | -t | string | Required. Scriptum template ID (e.g. text_embedding_index) |
--description | -d | string | Human-readable description |
--set | — | key=value (repeatable) | Template inputs — the CLI sends every value as a string |
# Text / PDF / docx → embeddings (canonical RAG)
dodil data vector collection add docs -b kb-prod \
--description "RAG corpus" \
--template text_embedding_index
# Code → embeddings (AST-aware chunking)
dodil data vector collection add code -b kb-prod \
--description "Source-code search" \
--template code_embedding_index
# Multimodal (images / video / audio / PDF page renders)
dodil data vector collection add assets -b kb-prod \
--description "Mixed-media library" \
--template visual_embedding_indexThe response is a Pipeline with its destination attached. Capture pipelineId — get, delete and every ingest command key off it.
--setonly sends strings.vcAddCmdwraps each value withstructpb.NewStringValue, so a template input that needs a number, boolean or array (e.g.object_embedding_index’slabels: [string]) cannot be supplied from the CLI. Use the API with a typedtemplateInputsmap for those.
The two inputs that genuinely are caller-tunable — chunk_size (default 500) and chunk_overlap (default 50) — are read from template_inputs, so --set chunk_size=800 works.
Pipeline.nameis the template id, not your collection name. The handler sets the pipeline row’snametotemplate_id(create_vector.rs:254), socollection addprints backVector collection 'text_embedding_index' (pipeline …) createdandcollection listshows NAME and TEMPLATE as the same string. Your name is on the destination — read it from.destination.name. This is a source bug, already logged.
It does not create an ingest rule
CreateVectorPipeline derives no rule; callers own rule scope. Nothing is ever embedded until you add one:
dodil data ingest add docs-corpus -b kb-prod \
-c "$PIPELINE_ID" \
-i '**/*.pdf' -i '**/*.txt'-c / --collection on ingest add sets CreateRuleRequest.pipeline_id — pass the pipeline id. Browse templates with dodil data vector templates to see the acceptedExtensions your globs should mirror — see templates.
dodil data vector collection get
dodil data vector collection get [pipeline-id] -b BUCKETTakes a pipeline id, not a name and not a collection id. Always prints JSON.
dodil data vector collection get "$PIPELINE_ID" -b kb-prod \
| jq '{
pipelineId, scriptumTemplate,
name: .destination.name,
status: .destination.status,
vector: .destination.vector
}'Useful for confirming dimensions, embedModel and physicalName before searching on the data plane.
dodil data vector collection list
dodil data vector collection list -b BUCKETListPipelines with facet = PIPELINE_FACET_VECTOR. Table output is PIPELINE_ID · NAME · TEMPLATE — and per the note above, NAME and TEMPLATE will be the same string. Use -o json and read .destination.name for the name you chose.
dodil data vector collection list -b kb-prod -o json \
| jq '.pipelines[] | {pipelineId, name: .destination.name, dims: .destination.vector.dimensions, model: .destination.vector.embedModel}'Note the response key is pipelines, not collections. Over HTTP the facet is a query parameter and only vector, table, object and graph are accepted — warehouse and tables are rejected with INVALID_ARGUMENT.
dodil data vector collection delete
dodil data vector collection delete [pipeline-id] -b BUCKETDeletes the pipeline row. This is wiring only — it does not drop the physical vector collection on the plane, which is plane state you drop yourself through the tables-gateway.
# 1. Delete the ingest rule you created
RULE_ID=$(dodil data ingest list -b kb-prod -p "$PIPELINE_ID" -o json | jq -r '.rules[0].ruleId')
dodil data ingest delete "$RULE_ID" -b kb-prod
# 2. Delete the pipeline
dodil data vector collection delete "$PIPELINE_ID" -b kb-prodFor a whole recipe-installed chain, POST /:bucket/pipelines/_batch-delete (BatchDeleteArtifacts) unwinds rules → pipelines → destinations in dependency order and is idempotent.
Common gotchas
| Symptom | Cause | Fix |
|---|---|---|
INVALID_ARGUMENT: template_id is required | --template omitted | Every vector collection is template-driven; there is no schema-only mode |
FAILED_PRECONDITION: template '…' contract has no resolvable embed_model | The template declares no embed_model input and no single-variant *EmbedModel enum | Pick a catalogued *_embedding_index template, or fix the template’s contract |
FAILED_PRECONDITION: template '…' contract has no resolvable dimensions | Same, for dimensions / a *Dimensions enum | As above |
ALREADY_EXISTS: a vector destination named 'x' already exists in bucket 'y' | Name collision within the bucket | Pick another name |
add succeeds but nothing is ever embedded | No ingest rule — the creator does not derive one | dodil data ingest add … -c "$PIPELINE_ID" -i '**/*.pdf' |
| Search skips the collection | The best-effort search-pipeline spawn failed, so nothing is bound | Check the response’s warnings[]; re-create from a *_index template |
| A template input that isn’t a string is rejected | --set sends every value as a string | Use the API with a typed templateInputs map |
See also
- Collections — API Reference — full surface incl. typed
template_inputs dodil data vector templates— discover templates foradddodil data vsearch— KNN on the data plane- Core Concepts → Collection — the pipeline / destination /
VectorConfigmodel - Recipes → Pipeline Collection + External Collection — end-to-end worked examples