Applies a top-level metadata patch to one visible vector. Missing vectors return a no-op mutation acknowledgement.
Successful mutations return an acknowledgement that identifies the affected target, the mutation effect, and commit facts when the operation changed stored state.
Examples
Patch the metadata of an existing vector.
CLI
$ strata vector collection create docs 3 cosine
$ strata vector upsert docs a [1.0,0.0,0.0] --metadata {"tag":"x"}
$ strata vector update-metadata docs a {"tag":"z"}
$ strata vector get docs a
Wire
{"collection":"docs","dimension":3,"metric":"cosine","type":"vector_create_collection"}
{"collection":"docs","key":"a","metadata":{"tag":"x"},"type":"vector_upsert","vector":[1.0,0.0,0.0]}
{"collection":"docs","key":"a","patch":{"tag":"z"},"type":"vector_update_metadata"}
{"collection":"docs","key":"a","type":"vector_get"}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
collection | string | yes | Collection name. |
key | string | yes | Vector key. |
patch | any | yes | Top-level metadata patch. |
Plus the optional scope: branch and space (default to the session branch and the "default" space).
Returns
MutationAck<VectorMetadataUpdate>.
Errors
failed_precondition.engine.runtime_closednot_found.engine.branchinvalid_argument.engine.product_spaceinvalid_argument.engine.vector_collectioninvalid_argument.engine.vector_keynot_found.engine.vector_collectioninvalid_argument.engine.vector_metadata_patch
Invocation
- CLI:
strata vector update-metadata - Wire type:
vector_update_metadata