> ## Documentation Index
> Fetch the complete documentation index at: https://infino-29-bot-sync-openapi-spec.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# BM25 full-text search

> Ranked BM25 full-text search over a full-text-indexed column.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/bm25_search/{database}
openapi: 3.1.0
info:
  title: Infino API
  description: >-
    The Infino hosted data-plane API: per-database table operations — create,
    ingest, search, and SQL.
  version: 0.1.0
servers:
  - url: https://api.platform.infino.ws
    description: Infino Cloud
security:
  - api_key: []
tags:
  - name: Databases
    description: Create, list, and delete the databases in your account.
  - name: Tables
    description: Create, drop, and list tables, and describe a table's schema.
  - name: Rows
    description: Append, update, and delete rows.
  - name: Search
    description: BM25, vector, and hybrid search, token and exact match, count, and SQL.
paths:
  /v1/bm25_search/{database}:
    post:
      tags:
        - Search
      summary: BM25 full-text search
      description: Ranked BM25 full-text search over a full-text-indexed column.
      operationId: bm25_search
      parameters:
        - name: database
          in: path
          description: Target database.
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Bm25SearchRequest'
        required: true
      responses:
        '200':
          description: >-
            Matching rows as an Arrow IPC stream
            (application/vnd.apache.arrow.stream), or JSON when the request
            sends `Accept: application/json`.
        '400':
          description: Invalid request body.
        '401':
          description: Missing or invalid API key.
        '503':
          description: >-
            The database's workers are still activating, or no capacity is free
            to place them. Transient — retry after the `Retry-After` interval.
      security:
        - api_key: []
components:
  schemas:
    Bm25SearchRequest:
      type: object
      description: |-
        `POST /v1/bm25_search/{database}`. Projection is optional (absent ⇒ the
        engine-native `_id` + `score`).
      required:
        - table_name
        - field_name
        - query
        - k
        - mode
      properties:
        b:
          type:
            - number
            - 'null'
          format: float
          description: |-
            Overrides the column's declared BM25 length normalization for this
            search only. Must be given together with `k1`.
        field_name:
          type: string
        k:
          type: integer
          minimum: 0
        k1:
          type:
            - number
            - 'null'
          format: float
          description: |-
            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`.
        mode:
          $ref: '#/components/schemas/Mode'
        projection:
          type:
            - array
            - 'null'
          items:
            type: string
        query:
          type: string
        stats:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Stats'
              description: |-
                BM25 corpus statistics for idf scoring. Absent ⇒ the deployed
                engine's own default, whatever that is; the engine SDK's remote
                transport always sends it explicitly.
        table_name:
          type: string
      additionalProperties: false
    Mode:
      type: string
      description: >-
        Boolean mode for a multi-term FTS query. Accepted case-insensitively on
        the

        wire (`"or"`, `"Or"`, `"OR"`); serialized canonically lowercase.
      enum:
        - or
        - and
    Stats:
      type: string
      description: >-
        Which BM25 corpus statistics to score term rarity (idf) with. Accepted

        case-insensitively on the wire (`"per_superfile"`, `"global"`);
        serialized

        canonically. Absent on a request ⇒ whatever the deployed engine defaults

        to, deliberately: an omitted field means "let the engine choose", so a

        raw REST caller and an SDK caller who both leave it out score alike, and

        the engine can improve its default without this contract going stale.
        Send

        the field explicitly to pin one mode across engine versions.
      enum:
        - per_superfile
        - global
  securitySchemes:
    api_key:
      type: http
      scheme: bearer

````