vector

delete_by_filter

Delete vectors matching a metadata filter.

strata vector delete-by-filter

wire vector_delete_by_filter

Scans the collection for visible vectors matching the metadata filter and deletes the matching rows as a bulk mutation.

Successful mutations return an acknowledgement of the outcome: for a state-changing write, the affected target with the mutation effect and commit facts; for mutations that produce a domain result (such as a branch or a promotion outcome), that result object.

To see the complete help for this command, run:

strata vector delete-by-filter --help

Example

Delete every vector whose metadata matches a filter.

strata vector collection create docs 3 --metric cosinestrata vector upsert docs a [1.0,0.0,0.0] --metadata {"tag":"keep"}strata vector upsert docs b [0.0,1.0,0.0] --metadata {"tag":"drop"}strata vector delete-by-filter docs --filter {"conditions":[{"field":"tag","op":"eq","value":{"type":"string","value":"drop"}}]}strata vector count docs

Parameters

NameTypeRequiredDescription
collectionstringyesCollection name.
filterVectorMetadataFilteryesMetadata filter.
branchstring or nullnoTarget branch. Defaults to the executor handle branch.
spacestring or nullnoTarget product space. Defaults to `"default"`.

Returns

MutationAck<VectorBulkDelete>

  • dataobject
  • typestring

Errors

Recover by code. Retry policy and commit outcome come from the shipped error registry.

← All 22 Vectors commands

agents: this page as markdown → /docs/reference/vector/delete_by_filter.md