Docs menu · Reference

Runs vector search and includes planner diagnostics such as index policy, source usage, artifact status, and fallback facts.

Search responses return a bounded list of matches ordered by the engine. They are not cursor pages unless a later command explicitly advertises pagination.

Diagnostic responses include operational facts intended for debugging and tuning. They should not be required for application correctness.

Examples

Nearest-neighbor search that also returns index diagnostics.

CLI

$ strata vector collection create docs 3 cosine
$ strata vector upsert docs a [1.0,0.0,0.0]
$ strata vector upsert docs b [0.0,1.0,0.0]
$ strata command run --command-json '{"collection":"docs","k":2,"query":[1.0,0.0,0.0],"type":"vector_index_query"}'

Wire

{"collection":"docs","dimension":3,"metric":"cosine","type":"vector_create_collection"}
{"collection":"docs","key":"a","type":"vector_upsert","vector":[1.0,0.0,0.0]}
{"collection":"docs","key":"b","type":"vector_upsert","vector":[0.0,1.0,0.0]}
{"collection":"docs","k":2,"query":[1.0,0.0,0.0],"type":"vector_index_query"}

Parameters

NameTypeRequiredDescription
as_ofintegernoOptional timestamp in microseconds.
collectionstringyesCollection name.
filterVectorMetadataFilternoOptional metadata filter.
kintegeryesMaximum number of matches.
querynumber[]yesQuery embedding.

Plus the optional scope: branch and space (default to the session branch and the "default" space).

Returns

SearchResult<VectorMatch> + IndexDiagnostics.

Errors

Invocation

  • CLI: via strata command run (no dedicated verb)
  • Wire type: vector_index_query

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