Skip to main content
POST
BM25 full-text search

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

database
string
required

Target database.

Body

application/json

POST /v1/bm25_search/{database}. Projection is optional (absent ⇒ the engine-native _id + score).

field_name
string
required
k
integer
required
Required range: x >= 0
mode
enum<string>
required

Boolean mode for a multi-term FTS query. Accepted case-insensitively on the wire ("or", "Or", "OR"); serialized canonically lowercase.

Available options:
or,
and
query
string
required
table_name
string
required
b
number<float> | null

Overrides the column's declared BM25 length normalization for this search only. Must be given together with k1.

k1
number<float> | null

Overrides the column's declared BM25 term-frequency saturation for this search only. Absent ⇒ score with whatever the column declared. Must be given together with b.

projection
string[] | null
rerank
object | null

Rows reranked for a question before they come back: {"question": "...", "k": 10}. The rows a query finds are each put to the deployment's grader with the question - the pass the agent APIs' ask ranks its results by - and the top k come back, best first, as JSON: {"rows": [...], "rerank": {...}} with the pass's coverage. The grader reads at most the deployment's triage pool (ask.triage.pool): a search fetches the pool rather than its k, and a match's or a statement's rows past the pool are neither graded nor returned, the coverage counting them (over_pool). k is the search's own when absent, or every row graded; a k over the pool is refused (400). Off when absent or null. Needs a deployment with the agent APIs and their triage pass; refused otherwise (501). Its shape is the agent APIs' (api::rerank::Rerank), carried here as it came.

Response

Matching rows as an Arrow IPC stream (application/vnd.apache.arrow.stream), or JSON when the request sends Accept: application/json.