OriginChainDB
Database endpoints

Search an index

Search a vector namespace with dense, sparse, lexical or hybrid ranking and an optional metadata filter.

POST /v1/tenants/{tenant}/vector-indexes/{index_id}/search

Combine the search evidence your task needsHybrid scores differ from raw dense-vector scores.
  1. Choose search inputsSupply dense, sparse, lexical or combined query evidence.
  2. Rank within a namespaceApply the requested filter and fusion settings.
  3. Inspect hits and completenessRead ranking_method and components before interpreting the result.

Before you start

Use your database bearer token.

Connection setup

Use the index_id returned when the index was created. Insert records into the target namespace before searching it.

Path parameters

FieldTypeRequired
tenantstringRequired
index_idstringRequired

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
  • mode: semantic, lexical, hybrid or dense_with_text_filter.
  • k is 1 up to the engine's limit (default 10,000).
  • include_components defaults to true, the other include_* to false.
  • Not yet served (501): expected_generation, timeout_ms, text_fields, a projection on a plan with a lexical leg, fusion weighted_sum and mode dense_with_text_filter.
  • Unknown fields at any depth answer 400 unknown_request_field.
FieldTypeRequiredDescription
denseobjectOptionalQuery by vector or by the id of a stored record. quality: exact, fast or high_recall (default).
Fields in dense
FieldTypeRequired
candidatesintegerOptional
qualitystringOptional
record_idstringOptional
vectornumber[]Optional
Fields in vector
FieldTypeRequired
vectornumberOptional
FieldTypeRequiredDescription
expected_generationstringOptional—
filterobjectOptional—
filter_exprobjectOptional—
fusionobjectOptionalmethod: rrf (optional rrf_k, default 60) or weighted_sum (weights required; currently answers 501).
Fields in fusion
FieldTypeRequired
methodstringRequired
rrf_kintegerOptional
weightsobjectOptional
Fields in weights
FieldTypeRequired
densenumberRequired
sparsenumberRequired
FieldTypeRequiredDescription
include_componentsbooleanOptional—
include_metadatabooleanOptional—
include_sparsebooleanOptional—
include_valuesbooleanOptional—
kintegerRequired—
lexicalobjectOptionalmatch: terms (default) or phrase. query is at most 4,096 bytes and must not be blank.
Fields in lexical
FieldTypeRequired
candidatesintegerOptional
fieldstringRequired
matchstringOptional
querystringRequired
FieldTypeRequired
metadata_fieldsstring[]Optional
Fields in metadata_fields
FieldTypeRequired
metadata_fieldsstringOptional
FieldTypeRequiredDescription
modestringRequired—
namespacestringRequired—
require_completebooleanOptional—
sparseobjectOptionalscorer: cosine or dot. At most 1,024 non-zero entries.
Fields in sparse
FieldTypeRequired
candidatesintegerOptional
indicesinteger[]Required
Fields in indices
FieldTypeRequired
indicesintegerOptional
FieldTypeRequired
scorerstringOptional
valuesnumber[]Required
Fields in values
FieldTypeRequired
valuesnumberOptional
FieldTypeRequired
text_fieldsstring[]Optional
Fields in text_fields
FieldTypeRequired
text_fieldsstringOptional
FieldTypeRequired
timeout_msintegerOptional

Read the result

hits contains ranked records; ranking_method and per-leg components explain the scores. Check completeness before interpreting an underfilled answer. A hybrid score is not the same quantity as a raw dense-vector score.

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.
404Check the resource ID and API route.
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.
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