> ## Documentation Index
> Fetch the complete documentation index at: https://infino.ai/docs/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:
        field_name:
          type: string
        k:
          type: integer
          minimum: 0
        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 engine
                default

                (per-superfile); the engine SDK's remote transport always sends
                it.
        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 ⇒ the engine default (per-superfile).
      enum:
        - per_superfile
        - global
  securitySchemes:
    api_key:
      type: http
      scheme: bearer

````