OriginChainDB
Database endpoints

Search a text field

Searches the full-text index of a table field by boolean match, phrase or BM25 relevance ranking.

GET /v1/tenants/{tenant}/fts/{table}/{field}

Match words, phrases or relevanceThe response shape depends on the selected search mode and options.
  1. Choose field and querySelect the indexed text to search.
  2. Pick the matching modeUse boolean terms, a phrase or BM25 ranking.
  3. Read the matching IDsInterpret scores only when that mode returns them.

Before you start

Use your database bearer token.

Connection setup

Index documents in the target field first. The examples search demo_docs/body.

Path parameters

FieldTypeRequired
tenantstringRequired
tablestringRequired
fieldstringRequired

Query parameters

FieldTypeRequired
qstringRequired
modestringOptional
kintegerOptional
fuzzyintegerOptional
highlightbooleanOptional
facetsstringOptional
explainbooleanOptional

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.

Read the result

BM25 returns ranked document IDs and scores. Boolean and phrase modes can return IDs without scores; highlight or facet options can produce an envelope. Read the response example for the mode you request instead of assuming one wire shape.

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.
408Reduce query work or adjust the timeout.
413Split or reduce the request body.
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