LanceDB · Schema

LanceDB Query Request

Request body for a hybrid vector / full-text / SQL query against a Lance table.

Vector DatabaseMultimodalLance FormatLakehouseRAGAgent MemoryOpen SourceEmbeddingsFull-Text SearchHybrid SearchColumnar StorageArrowAI Infrastructure

Properties

Name Type Description
vector array Query vector for nearest-neighbor search.
vectorColumn string Name of the embedding column to search.
k integer Number of nearest neighbors to return.
metric string Distance metric override.
fullTextQuery string BM25 full-text query string.
ftsColumns array Columns to apply the FTS query against.
filter string SQL WHERE-style predicate (Arrow SQL flavor).
select array Columns to project.
withRowId boolean Include the internal Lance row id in the result.
rerank object Optional reranker for hybrid search.
nprobes integer Number of IVF partitions to probe.
refineFactor integer Over-fetch factor before exact-distance refinement.
version integer Time-travel: query at a specific table version.
View JSON Schema on GitHub

JSON Schema

lancedb-query-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/lancedb/main/json-schema/lancedb-query-schema.json",
  "title": "LanceDB Query Request",
  "description": "Request body for a hybrid vector / full-text / SQL query against a Lance table.",
  "type": "object",
  "properties": {
    "vector": {
      "description": "Query vector for nearest-neighbor search.",
      "type": "array",
      "items": { "type": "number" }
    },
    "vectorColumn": {
      "type": "string",
      "description": "Name of the embedding column to search."
    },
    "k": {
      "type": "integer",
      "minimum": 1,
      "default": 10,
      "description": "Number of nearest neighbors to return."
    },
    "metric": {
      "type": "string",
      "enum": ["l2", "cosine", "dot"],
      "description": "Distance metric override."
    },
    "fullTextQuery": {
      "type": "string",
      "description": "BM25 full-text query string."
    },
    "ftsColumns": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Columns to apply the FTS query against."
    },
    "filter": {
      "type": "string",
      "description": "SQL WHERE-style predicate (Arrow SQL flavor)."
    },
    "select": {
      "type": "array",
      "items": { "type": "string" },
      "description": "Columns to project."
    },
    "withRowId": {
      "type": "boolean",
      "default": false,
      "description": "Include the internal Lance row id in the result."
    },
    "rerank": {
      "type": "object",
      "description": "Optional reranker for hybrid search.",
      "properties": {
        "type": {
          "type": "string",
          "enum": ["rrf", "linear", "cohere", "cross-encoder"]
        },
        "weights": {
          "type": "object",
          "properties": {
            "vector": { "type": "number" },
            "fts": { "type": "number" }
          }
        }
      }
    },
    "nprobes": {
      "type": "integer",
      "minimum": 1,
      "description": "Number of IVF partitions to probe."
    },
    "refineFactor": {
      "type": "integer",
      "minimum": 1,
      "description": "Over-fetch factor before exact-distance refinement."
    },
    "version": {
      "type": "integer",
      "minimum": 0,
      "description": "Time-travel: query at a specific table version."
    }
  }
}