OriginChainDB
Database endpoints

Explain a vector search

Run a vector search and inspect the search settings used for its results.

POST /v1/tenants/{tenant}/vector/{table}/topk_explain

Inspect why a vector search behaved differentlyThe explanation reports the configuration used for this search.
  1. Supply the query and settingsChoose dimension, metric, filters and execution options.
  2. Run the explained searchRetrieve ranked hits with their configuration.
  3. Compare config with expectationsInvestigate unexpected rankings using the actual settings.

Before you start

Use your database bearer token.

Connection setup

Store dense vectors in the collection before searching it. The example uses demo_vectors; scores depend on your data and distance metric.

Path parameters

FieldTypeRequired
tenantstringRequired
tablestringRequired

Headers

FieldTypeRequiredDescription
x-oc-db-userstringOptionalActing database user (role, grant and row-policy checks). Send with x-oc-db-key.
x-oc-db-keystringOptionalAPI key of the x-oc-db-user user.

Request body

application/json

Limits and accepted values
  • Same body as the vector top-k search.
  • query must be finite numbers of length dim.
  • metric: cosine|dot|l2|manhattan.
  • filter: equality map {field: value} (explicit null is 400).
  • filter_expr: typed filter expression;
  • not combinable with a non-empty filter.
  • require_complete=true turns an underfilled filtered answer into 422.
  • mode: fast | high_recall (default).
  • engine: hnsw | bruteforce (internal tuning knob).
  • index: hnsw (default) | ivf | ivf_pq.
  • nprobe: 1..256 cells for ivf/ivf_pq.
  • refine_k_factor: ivf_pq exact re-rank over-fetch factor.
FieldTypeRequired
dimintegerRequired
embedderstringOptional
filterobjectOptional
filter_exprobjectOptional
indexstringOptional
kintegerRequired
metricstringOptional
modestringOptional
nprobeintegerOptional
querynumber[]Required
Fields in query
FieldTypeRequired
querynumberOptional
FieldTypeRequired
refine_k_factorintegerOptional
require_completebooleanOptional

Read the result

hits is the ranked result and config shows the search configuration used. Use it to check dimensions, metric and execution choices when investigating unexpected rankings.

Response statuses

HTTP status reference
StatusWhat to do
200OK
400Correct the request before retrying.
401Check the credential and Authorization header.
402Check feature access or available credits.
403Check tenant access, roles and permissions.
408Reduce query work or adjust the timeout.
409Resolve the conflict before retrying.
413Split or reduce the request body.
415Send the required Content-Type.
422Correct the values or unsupported combination.
429Honor Retry-After when present; back off.
499The client cancelled the request.
500Check the outcome before retrying a write.
501Check deployment support for this operation.
503Honor Retry-After when present; check write outcomes.
© 2026 Silicoyn Technologies Pvt Ltd