Creates a collection for dense vectors. The dimension and metric become part of the collection contract for future upserts and queries.
Successful mutations return an acknowledgement that identifies the affected target, the mutation effect, and commit facts when the operation changed stored state.
Examples
Create a vector collection, then confirm its dimension.
CLI
$ strata vector collection create docs 3 cosine
$ strata vector collection stats docs
Wire
{"collection":"docs","dimension":3,"metric":"cosine","type":"vector_create_collection"}
{"collection":"docs","type":"vector_collection_stats"}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
collection | string | yes | Collection name. |
dimension | integer | yes | Embedding dimension. |
metric | VectorDistanceMetric | yes | Distance metric. |
Plus the optional scope: branch and space (default to the session branch and the "default" space).
Returns
MutationAck<VectorCollectionCreate>.
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_dimensioninvalid_argument.executor.vector_dimension
Invocation
- CLI:
strata vector collection create - Wire type:
vector_create_collection