vector
sample
Sample vectors with values and version facts.
strata vector samplewire vector_sample
Returns a deterministic representative sample of vectors from a collection: the total live count and up to `count` entries (default 10), evenly strided over the ordered keys. Latest state only.
Paginated responses use opaque cursors. Clients should pass the returned cursor back to the same command shape and must not parse cursor contents.
To see the complete help for this command, run:
strata vector sample --help
Example
A representative sample of stored vectors plus the total count.
strata vector collection create docs 3 --metric cosinestrata vector upsert docs a [1.0,0.0,0.0]strata vector upsert docs b [0.0,1.0,0.0]strata vector sample docs
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| collection | string | yes | Collection name. |
| branch | string or null | no | Target branch. Defaults to the executor handle branch. |
| count | integer or null | no | Optional sample count. Defaults to 10. |
| space | string or null | no | Target product space. Defaults to `"default"`. |
Returns
SamplePage<VectorVersionedData>
- dataobject
Shared pagination continuation facts.
- typestring
Errors
Recover by code. Retry policy and commit outcome come from the shipped error registry.
| Code | Retry | Commit outcome |
|---|---|---|
| failed_precondition.engine.runtime_closed | never | not_started |
| not_found.engine.branch | never | not_applicable |
| invalid_argument.engine.product_space | never | not_started |
| invalid_argument.engine.vector_collection | never | not_started |
| invalid_argument.engine.vector_key | never | not_started |
| not_found.engine.vector_collection | never | not_applicable |