Commit Graph
1016 Commits
Author SHA1 Message Date
TRexy 50de29bdd5 docs(python): show multiple embedding functions with Pydantic (#5371)
Closes #1911

## Why

The Managing Embeddings guide described multiple embedding columns at a
high level. Python readers needed a complete Pydantic example showing
how to pair the fields, populate both vectors, and choose which vector
column to search.

## What changed

- Explain the one-to-one pairing in `LanceModel`. Use the same
embedding-function instance for one `SourceField()` and one
`VectorField()`, and create a separate instance for each pair even when
the provider and settings match. If several fields should contribute to
one vector, combine their values into a single source field before
ingestion.
- Add a runnable LanceDB Embedded example that pairs `title` with
`title_vector` and `description` with `description_vector`. Both pairs
use separate instances of `all-MiniLM-L6-v2`. Inserting rows with titles
and descriptions populates both vector columns, and reopening the table
preserves both mappings.
- Show how `vector_column_name` selects the vector column and embedding
function for a text query. Searching titles for “Alpine hiking” returns
“Hiking in the Alps”, while searching descriptions for “feeding
sourdough starter” returns “Baking sourdough”.
- Generate the published snippet from the example test. This is a
documentation and example-test change.

## Validation

- The new docs test and existing multiple-embedding regression test
passed. The docs test mocks only model inference and checks both
persisted field mappings, the stored vectors and their dimensions, both
search results, and the ambiguity error when `vector_column_name` is
omitted.
- The generated example also passed with the cached real model. Both
columns contained 384-dimensional embeddings and both searches returned
the expected articles.
- Ruff lint and `git diff --check` passed. The formatter reports two
existing differences in unrelated examples in the same test file.
2026-12-02 21:06:42 +00:00
Xuanwo 08a286edb3 feat: add resumable staged table writes (#5358)
A coordinator can publish batches staged by multiple ingest workers in a
single table version. This adds staged append and overwrite in LanceDB
Embedded and Enterprise across Rust, synchronous and asynchronous
Python, and TypeScript. Ordinary `table.add()` continues to commit
immediately.

A coordinator selects the mode with `begin_write(mode)` (`beginWrite` in
TypeScript) and shares the opaque write ID. Workers open the same
writable table and branch and resume with `open_write(id)` (`openWrite`
in TypeScript). They can retry the same input with the same idempotency
key. Staging returns no version. Explicit `commit()` publishes one
version and returns `AddResult`. Explicit `abort()` discards the staged
write and can be repeated. Dropping a handle performs no I/O.

Enterprise uses the existing multipart endpoints on servers with
multipart write support. A non-empty staged overwrite input carrying
top-level Arrow schema metadata fails before the SDK sends any part
insert. The SDK enforces this in Rust `StagedWrite::add(...).execute()`,
Python `StagedWrite.add` and `AsyncStagedWrite.add`, and TypeScript
`StagedWrite.add` on every supported Enterprise server version. Empty
input is a no-op. Staged append and overwrite with an empty top-level
map are supported, including field and nested field metadata on
overwrite. [OSS-2859](https://linear.app/lancedb/issue/OSS-2859) ·
[Distributed reads in OSS-441](https://linear.app/lancedb/issue/OSS-441)

The separate Sophon fix preserves top-level schema metadata in the
server’s multipart overwrite path. The SDK follow-up verifies a route
that sends every part, retry, and completion to fixed instances before
lifting the guard.
[ENT-4970](https://linear.app/lancedb/issue/ENT-4970/multipart-overwrite-drops-top-level-schema-metadata-in-sophon)
· [Sophon #11472](https://github.com/lancedb/sophon/pull/11472) ·
[OSS-3312](https://linear.app/lancedb/issue/OSS-3312/enable-schema-metadata-in-enterprise-staged-overwrite-after-verifying)

Embedded staged overwrites keep top-level, field, and nested-field
metadata from the replacement schema. Commit rejects overwrite parts
whose restored schemas differ. The Insert data guide shows staged writes
in Python, TypeScript, and Rust. The Distributed Write guide describes
both SDK-coordinated staging and server-coordinated CTAS.

## Validation

Final head `cf6737cece7b17f33a13556ba13f1460a0d4cfc8` adds the guard in
`a02beb97084cb9d5d70b0bfdbbf31ce7bb4b1067` and a documentation-only
commit.

- **Rust.** All 14 `--lib staged_write` tests and all 15 `--lib
multipart_write` tests passed with the locked `ci` profile and
Enterprise support.
`explicit_enterprise_overwrite_rejects_schema_metadata_before_upload`
covers rejection before insert, known and streaming empty inputs, and a
subsequent field-metadata part in the same session.

- **Python and Sophon 1.16.0.** The Python extension was rebuilt with
the final Rust inputs. The staged-write and permutation suites passed
133 tests with 2 skipped. On the isolated released-service fixture, sync
and async staged overwrite rejected top-level metadata with zero insert
requests. A materialized zero-row table and a streaming zero-row batch
both succeeded without an insert. A fresh read verified the original
version, row, and schema. Two independent workers then staged parts with
field and nested field metadata, and an independent coordinator
published one version with exactly the replacement rows. The reopened
SDK table and Lance manifest preserved that metadata. Ordinary overwrite
and staged append also succeeded.

- **TypeScript and docs.** TypeScript compilation, lint, TypeDoc, strict
MkDocs, and Vale passed. The final TypeScript changes are documentation.
The earlier Node native build and staged-write test below cover the
binding. The Rust tests and rebuilt Python extension exercised the final
shared guard.

At `ab9f49fba5055a5f731fe013a820515aa5cfa12c`, all 11 Rust staged-write
integration tests and 13 staged-write unit tests passed. The new tests
exercise independent reopen, reject differences at each metadata level,
and verify one publication with the complete schema after replacing the
mismatched part. Rust formatting and Vale passed for the follow-up.

On the initial validation head
`68e950d24a1418890f80eb04102de49388012318`:

- Rust passed the library check with Enterprise support and 15 existing
multipart tests.
- Python passed both staged-write tests covering synchronous
multiprocessing and asynchronous overwrite and abort. The separate
fail-loud fragment constraint regression passed all 39 cases.
[#5120](https://github.com/lancedb/lancedb/pull/5120)
- Node.js passed the native build, TypeScript compilation, lint, and the
staged-write Jest test. TypeDoc generation and strict MkDocs also
passed.

The initial Python and Node.js native extensions were built at
`47ea43533f103744e84a7cdbe83d8e4a8ddf093e` with the repository’s `ci`
profile, the default SDK features, and locked Lance 16.0.0-beta.7 and
`object_store` 0.14.2. The initial validation head differs from that
build commit only in two generated TypeDoc pages. The Python and Node.js
tests ran again at that head using the same native artifacts.

The candidate Python SDK passed multipart create, cross-process staging,
commit, and abort against released LanceDB Enterprise (Sophon) 1.16.0 on
an isolated loopback gateway and S3-compatible store. After an ordinary
append published version 2, a separate coordinator committed the staged
batches once to version 3, with exactly the three expected rows. The
probe also verified overwrite conflict handling, schema refresh after a
successful overwrite, and branch and pinned-handle behavior.

Both abort modes removed the upload marker and staged transaction
records, rejected subsequent staging and commit, and left the table at
version 3 with the same rows. Append abort removed its staged payload.
Overwrite abort left one unreferenced data file in object storage for
storage cleanup.

A separate Sophon 1.16.0 probe confirmed that multipart overwrite loses
top-level schema metadata, including `embedding_functions` and
`lancedb::column_definitions`. Field and nested-field metadata survived,
and a single-request overwrite preserved the full metadata on the same
input.

## Local security comparison

Compared head `ab9f49fba5055a5f731fe013a820515aa5cfa12c` with its merge
base `c85647526c90647d9b5d6a701afeacca3f47b34d`.

- **Dependencies.** OSV-Scanner 2.7.1 used one offline crates.io
advisory snapshot for both Cargo locks. Each scan read 1,098 package
entries and reported the same 48 advisory matches across 24 package
versions. The change makes the already-locked `prost` 0.14.4 a direct
dependency for Embedded, where Lance already pulls it in. OSV and the
GitHub Advisory Database returned no advisory for that version. The
Cargo, Python, and Node lockfiles are byte-identical. The latter two
therefore did not require a dependency audit.

- **Source.** Semgrep Community Edition 1.187.0 ran 658 security and
secret rules on 16 baseline files and 24 candidate files across Rust,
Python, and TypeScript. Both results contained the same 31 matches on
unchanged code, with zero skipped targets or parse errors. These were
existing Rust `unsafe` blocks in tests and N-API branch metadata, a
Python serialization check, and a TypeScript iterator call through
`Symbol.asyncIterator`. [Rule
snapshot](https://github.com/semgrep/semgrep-rules/tree/a5ad1714f00c9f7fde980cab0ea1d6dc6d414fd2)

The OSV results cover lockfile package versions in the local database.
Semgrep covers the changed source files with file-local analysis.
Rule-level Aikido results were unavailable for comparison.
2026-12-02 20:52:30 +00:00
Yang Cen 33fdf6a7ce docs: document visible row counts for RTE tables (#5362)
## Summary

Document how to count visible rows in an Enterprise Realtime Engine
table. Use `COUNT(*)` when Flight SQL is reachable, or sum Arrow batch
sizes from an unbounded, one-column REST scan. Explain the cost of the
REST scan and the scope of the explicit base-table count.

## Validation

Exercised both routes through published Python clients on isolated
Linux. The large fixture returned 100,000 visible rows, then 99,999
after an overwrite and a base-key delete, then 99,998 after a fresh-key
delete. An independent key/value oracle matched each stage. The REST
base-only count stayed at 80,000 and the default REST count returned
HTTP 400.
2026-12-03 03:16:29 +08:00
Yang Cen feff86a08d feat(query): stream query results with optional total hits (#5354)
## Summary

An Embedded query can stream one page of results and report how many
visible rows matched before offset and limit. This adds Rust
`execute_with_metadata`, Python sync and async `to_result`, and
TypeScript `toResult`. The existing query terminals continue to use
their existing execution paths.

Tracking defaults to Off. An exact count returns `eq(N)`. A positive cap
C returns `eq(N)` below C and `gte(C)` as soon as C matches are proven,
including equality. TypeScript exposes counts as bigint. Counts use the
same snapshot as the result batches. The accessor reports pending until
the stream reaches successful EOF. Explicit counts can add work after
the last batch, especially when full-text counting needs to scan visible
text. Closing an unfinished result cancels execution. Stream and
metadata failures retain interruption details, including the request ID.

Embedded supports scalar and row-level lexical counts. Unordered FTS
retains its existing top-k and scoring policy. Enterprise and
unsupported query shapes return a typed error when a count is requested.

## Dependency

#5352 merged Lance v16.0.0-beta.7 into main, including [Lance
#11680](https://github.com/lance-format/lance/pull/11680). This PR uses
that dependency and its lockfiles.

## Validation

The Linux-tested revision `bc39ad7ac` and rebased revision `24f4e90c2`
have the same Git tree. The only change in `6932b3082` is the Python
namespace regression fixture, which now resolves the local table without
the optional pylance package. The revised test passed on managed Linux
with CPython 3.11.18 both with pylance and pandas installed and after
removing both packages. Managed Linux runs used the unmodified manifests
and lockfiles from #5352 and the published `pylance 16.0.0b7` wheel.

- The Rust metadata suite passed 57 tests, with two existing ignores.
Coverage includes unordered FTS plans, top-k scores, physical row
addresses under pagination, pending-read cancellation, and interruption
after the last batch.
- Python query, remote and namespace suites passed 1,163 tests. One
optional slow test requires PyTorch, which was unavailable on this VM.
The Node query, remote, table and error suites passed 913 tests, with
three experimental cases skipped.
- Regression tests reproduced the failures on the previous revision and
verified the fixes. Python sync reranking and namespace FTS preserve an
explicit empty page. Python sync and async scans expose `_rowaddr`
alongside the pre-pagination count. Explicit counts are rejected before
TypeScript auto-search issues an Enterprise request or invokes a vector
embedding provider. Python and Node retain the server's 1,063-row first
batch in Off mode.
- A custom Python namespace opened through the public API receives the
same computed projection in Off mode as with `to_batches()`. A Node
result interrupted after another SDK load retains its original error
class and request ID. Both regressions were reproduced on the prior
revision.
- Workspace Clippy, formatting, Ruff, Biome, TypeScript checks, TypeDoc
and strict MkDocs passed. All 287 generated TypeDoc files matched the
committed files byte for byte.
2026-12-02 22:47:37 +08:00
Lucia CerchieandLucia Cerchie 623777389e fix(docs): unblock nightly eval preparation for Firecrawl (#5309)
The nightly Agent Evals workflow stops during documentation preparation
because the Firecrawl example names a fixed Enterprise edition. Use the
unversioned integrations URL and regenerate the snippet so the
development composer accepts the example.

This fixes the preparation error in [run
46482397051](https://github.com/lancedb/docs/actions/runs/46482397051).
The public URL currently redirects to the same integrations page.

## Checks completed

- Reproduced the composer failure with the exact three source revisions
from the failed run.
- Passed documentation assembly, development composition, and skill
packaging after the change.
- Passed Ruff formatting, Ruff lint, and `git diff --check`.
- Confirmed that the public URL redirects and returns HTTP 200.

The live Firecrawl example and full eval suite were not run. The
Firecrawl example requires a personal API key and consumes service
credits.

## Clicktesting

Required tools: Git, GitHub CLI, GNU Make, uv, Node.js 20 or later, and
npm. Use your own GitHub account with read access to `lancedb/docs` and
`lancedb/sophon`. No service secrets are required for these
documentation checks.

Start in an empty directory. Authenticate with your own account, then
obtain the branch and the build inputs:

```bash
gh auth login
gh repo clone lancedb/lancedb lancedb
git -C lancedb switch --track origin/fix/nightly-firecrawl-url
gh repo clone lancedb/docs docs
git -C docs checkout 1a2a108f590405ae7dcec16da098c8c94f75469b
gh repo clone lancedb/sophon sophon
git -C sophon checkout d471a248ab3e80e08b92c432c969027643dee33e
npm install --global mint@4.2.888
uv python install 3.13
cd docs
export LANCEDB_DOCS_ROOT=../lancedb/docs/web
export SOPHON_DOCS_ROOT=../sophon/docs/web
make assemble
uv run --no-project --python 3.13 --with pyyaml python scripts/compose.py --development build/site --output build/nightly
make package-skill
```

Expected result: all three build commands succeed. Composition must not
report that Firecrawl code uses another edition.

Start the documentation application from the generated directory:

```bash
cd build/nightly
mint dev --port 3000
```

Open
`http://localhost:3000/enterprise/development/integrations/data/firecrawl`.
Find “Crawl a site.” Confirm that its Python example uses
`https://docs.lancedb.com/integrations`.

In a second terminal, check the live destination:

```bash
curl -sSL -o /dev/null -w '%{http_code} %{url_effective}\n' https://docs.lancedb.com/integrations
```

Expected result: HTTP 200 and the current edition's integrations URL.

Co-authored-by: Lucia Cerchie <cerchie@Lucias-MacBook-Pro.local>
2026-12-02 05:59:55 -08:00
Xuanwo 0a14761f0e feat(python): open blob files by row offset (#5356)
Open seekable Blob files by row position with
`table.take_blob_files(column, offsets, *, buffer_size=None)` on
synchronous and asynchronous Embedded and Enterprise tables. Results
follow the requested order, duplicate offsets have independent cursors,
and NULL and empty values stay distinct. An invalid offset rejects the
entire batch.

Enterprise resolves positions and descriptors together and verifies one
snapshot across descriptor queries, location resolution, and
authenticated byte reads. Eligible ranges use the existing presigned
read path when the gateway advertises it.

Refs [OSS-2881](https://linear.app/lancedb/issue/OSS-2881).

## Validation

- On Enterprise 1.16.0, the same locked wheel passed both sync and async
reads of 1,025 distinct offsets after a deletion. The offsets matched an
independent ordered query, and the two descriptor chunks and subsequent
authenticated requests matched the pinned version and snapshot identity.
- Both APIs returned byte-for-byte matches for 37-byte proxy reads and a
32 MiB presigned object-store read. The large reads used zero gateway
byte requests. An independent range check returned two object-store HTTP
206 responses with matching physical ranges and bytes.
- The wheel passed 23 focused Python tests. The Rust library check and
all 81 Enterprise Blob module tests passed, including nested NULL and
strict snapshot echo cases.

Runtime evidence is from commit
`f56c359ba7874cd75c52169491166a941251510f` with Lance `16.0.0-beta.6`,
wheel SHA-256
`9abbbfe584513432547d237dcf7b684b479b35cad07c48cd9899d381f0e80423`. The
merge preview with `main` at `ff556729` is clean.
[#5352](https://github.com/lancedb/lancedb/pull/5352) updates the
integration dependencies to Lance `16.0.0-beta.7` and `object_store`
`0.14.2`. Those pins are outside the tested wheel's coverage.

The synthetic test table was removed from the catalog. Its physical
storage cleanup is tracked separately.
2026-12-02 12:47:38 +00:00
TRexy eea95c8778 feat(python): support SigLIP image search with OpenCLIP (#5355)
## Summary

- Use the existing OpenCLIP provider with the SigLIP SO400M checkpoint
to embed image files and search them from Python.
- Accept filesystem path objects for vector queries and preserve Windows
drive letters and special characters in image ingestion paths. String
queries continue to use the text encoder.
- Add sync and async regression tests and a generated, runnable
documentation example.

Refs #4767

## Validation

- Embedding suite with 122 passing tests, CI-pinned Ruff, Linux-targeted
Pyright, and strict MkDocs.
- The real SigLIP checkpoint returned 1,152-dimensional unit-normalized
vectors and ranked the matching image first. The Windows smoke test used
the non-mapped safetensors reader and one shared model instance.
- Five row-address tests also failed with the preview native extension
on the unmodified base. The source-built CI run will cover these tests.
2026-12-02 12:43:07 +00:00
Xuanwo b5f35d5c56 fix: honor Enterprise query batch size limits (#5350)
Enterprise queries could return Arrow batches larger than the size
explicitly requested by the caller. The SDK now slices oversized batches
in the final query stream and keeps server-selected batch sizes when the
caller omits the limit or passes zero.

The search guide shows how to stream a full table or filtered scan in
one query using Python's `search().to_batches()`. It covers older
deployments that return buffered Arrow IPC files or enforce a query row
cap.

A local Enterprise 1.16.0 probe streamed all 131,073 rows from a pinned
snapshot in one query, with batches of at most 37 rows and the first
batch available before the Arrow end-of-stream marker. The probe ran
with Plan Executor enabled and disabled.

Related to OSS-3133.
2026-12-02 09:42:17 +00:00
Yang Cen 50c66c66d5 fix(python): return row addresses from embedded scans (#5344)
## Problem

Embedded Python queries accept `with_row_address()`, but ordinary sync
and async scans omit `_rowaddr`.

## Fix

Pass the existing option to the Lance scanner for Embedded base-table
scans. Embedded namespace queries that request addresses use the
Embedded scanner. An RTE scan reports that addresses require
`use_rte(False)` to read the base table.

## Validation

The two-fragment tests verify sync batches and async Arrow results,
`uint64` physical addresses, projection, and default and explicit
disabling. Stable row IDs confirm that `_rowaddr` is distinct from
`_rowid`. Additional tests cover namespace routing, RTE and vector/FTS
builder conversion.

All applicable checks passed for `64dd3c0e`. The baseline test run
stopped at the `stats()` fixture and did not reach the query assertions.

Tracks OSS-2972.
2026-12-02 09:28:50 +00:00
Xuanwo 2e46464589 docs: group ordered takes for training batches (#5351)
Training samplers can group several batches of offsets into one bounded
Enterprise request. The guide uses `take_offsets(...,
preserve_order=True)` on the sampler's table version and checks the
returned row count before splitting the rows back into the original
training batches. It explains the buffering trade-off and how to apply
the same cardinality check to row-ID lookups.

Related to [OSS-3134](https://linear.app/lancedb/issue/OSS-3134).
2026-12-02 09:19:33 +00:00
Xuanwo 16c934a827 docs(python): document single-commit RecordBatchReader appends (#5349)
Python callers can pass a `pyarrow.RecordBatchReader` to `add()` to
commit multiple batches as one table version. The insert guide shows the
synchronous and asynchronous calls, when to use separate calls for
independently acknowledged flushes, and the server protocol and catalog
requirements for Enterprise multipart uploads.

Both examples advanced the table by one version on the Enterprise 1.16.0
directory and manifest catalogs with Python SDK 0.42.1.
2026-12-02 09:16:36 +00:00
Xuanwo 36814ac87b docs: clarify Enterprise migration writes and row caches (#5348)
The Attach Database guide now shows how to switch writers to the
Enterprise SDK or SQL and how to request a fresh read. It also shows how
to retain a tagged snapshot for cached row addresses or rebuild a cache
with business keys or stable row IDs that are already enabled on the
target table.

The saved Enterprise 1.12.0, 1.13.0, and 1.14.0 editions omit this
migration guidance. The six Python examples ran with Enterprise 1.16.0
and Python SDK 0.42.1 on both directory and manifest catalogs. With a
configured 60-second weak read interval, a primed reader still saw v1
after a bare URI commit. The zero interval and `checkout_latest()` each
read v2 in independent cases.

Related issues are [OSS-3150](https://linear.app/lancedb/issue/OSS-3150)
and [OSS-3151](https://linear.app/lancedb/issue/OSS-3151).
2026-12-02 08:46:47 +00:00
Xuanwo a46ed4754b docs: expose checkpoint delta in the table guide (#5347)
Show the checkpoint delta section in the Tables guide. The Python,
TypeScript, and Rust SDKs ship the API from #5135 and #5149 in
[v0.42.1](https://github.com/lancedb/lancedb/releases/tag/v0.42.1).

Verified that Mintlify renders the checkpoint anchor and all three
language tabs. The Python and TypeScript examples run against the
published 0.42.1 packages.

An Embedded docs edition prepared from the v0.42.1 tag will need a
recorded correction for this section because the tag still wraps it in a
draft comment.

Refs
[OSS-2860](https://linear.app/lancedb/issue/OSS-2860/version-to-version-diff-branch-diff-is-enterprise-only).
2026-12-02 15:39:26 +08:00
Lance Release 585e598092 Bump version: 0.43.0-beta.0 → 0.43.0-beta.1 2026-12-02 07:20:55 +00:00
lancedb-gatefixer[bot]andXuanwo 43d28def80 docs(node): clarify full-text search filtering (#3813)
## Summary

- Replace the website's TypeScript full-text filtering examples with a
snippet generated from `docs/web-tests/ts/full_text_search.test.ts`. In
a full-text-only query, `where(...)` filters rows before the search
selects candidates.
- Update the guide and regenerate the Node API reference. Vector and
hybrid queries also prefilter by default and can use
`VectorQuery.postfilter()`. In hybrid search, it filters candidates from
both searches before reranking.

## Root cause

The website's TypeScript examples used the legacy `vectordb` method
`.prefilter(...)`, which is absent from `@lancedb/lancedb`. The Node API
reference left full-text and hybrid filter timing implicit.

## Validation

- Ran `full_text_search.test.ts`, `filtering.test.ts`, and
`search_examples.test.ts` in `docs/web-tests/ts` with the locked npm
SDK. All eight tests passed, as did a targeted TypeScript check of those
files.
- Ran the exact snippet imported by the guide against the locked npm SDK
and the SDK built from this branch. Both runs returned the expected
full-text match and confirmed prefiltering and postfiltering behavior
for vector and hybrid queries.
- Built the Node native binding, compiled the SDK, and regenerated the
TypeDoc reference. Biome passed for the SDK, SDK examples, and the
changed website test. The full website test directory produced the same
existing Biome and TypeScript diagnostics as `main`.

Fixes #2237

<!-- lance-gatekeeper-fix:v1 agent=1e80a282d1024d8eadf8e0ff33d83c9d
generation=1 -->

---------

Co-authored-by: Gatefixer <313497061+lancedb-gatefixer[bot]@users.noreply.github.com>
Co-authored-by: Xuanwo <github@xuanwo.io>
2026-12-02 13:42:46 +08:00
b3a8e6f08d fix: read LANCEDB_API_KEY when connecting to remote without api_key (#5166)
## Summary

- Rust remote connect reads `LANCEDB_API_KEY` when a `db://` connection
has no `api_key` and no `oauth_config`. Python already does this in its
own wrapper; Node and Rust callers did not.
- An explicit API key still wins. An empty `LANCEDB_API_KEY` is treated
as present, matching Python's `is None` check, and the connection sends
no `x-api-key` header.
- OAuth does not read the variable, so an ambient key cannot turn an
OAuth connect into an invalid API-key-plus-OAuth configuration. The
fallback lives in Rust `execute_remote`, so Node does not write the
credential into the caller's options object.

Supersedes #3797, which is stale and conflicting. This addresses the
Gatekeeper requests there: do not apply the environment key when
`oauthConfig` is set, and do not write it into the caller-owned options.

## Test plan

- [x] `cargo test --features remote -p lancedb --lib connection::` (each
env case re-runs the test binary as a child process with
`LANCEDB_API_KEY` set or removed on the child `Command`; no in-process
`set_var`/`remove_var`)
- [x] `cargo clippy -p lancedb --all-targets --features remote -- -D
warnings`
- [x] `cargo fmt --all -- --check`
- [x] `cd nodejs && pnpm build`
- [x] `cd nodejs && pnpm exec jest __test__/remote_api_key_env.test.ts`
(env set only in a child process; missing-key case asserts `connect()`
itself rejects against the loopback endpoint; OAuth case asserts
`x-api-key` is absent)
- [x] `cd nodejs && pnpm lint-ci`; `pnpm run docs` leaves `docs/src/js`
unchanged

Written with Cursor (Grok).

---------

Co-authored-by: Preston Zhao <195942578+canyang25@users.noreply.github.com>
Co-authored-by: Xuanwo <github@xuanwo.io>
2026-12-02 13:04:57 +08:00
KarthikS 3afd0ced9c fix: reject combined-fields queries on legacy Enterprise servers (#5343)
Closes #5340.

Reject `CombinedFields` before sending an FTS query to a LanceDB
Enterprise server older than 0.3.0. The check follows all Boolean
clauses and both sides of a Boost query. The 0.3.0 regression test also
checks that unequal column weights and the `AND` operator reach the
server.

Reproduced with Python SDK 0.42.1 against a mock 0.2.0 server. Both
searches returned HTTP 200. The top-level query lost its weights and
operator, and the nested Boolean query sent an empty string. The same
searches preserved the structured query on 0.3.0.
2026-12-02 12:04:52 +08:00
Bruno Ramirez 1a8810e81d docs(cli): document Python installation and publish retries (#5332)
The CLI guide covers Homebrew, the shell installer, and manual
downloads. Readers who use Python tools need the PyPI package name
because it differs from the executable name. This adds examples for
running the CLI once and installing it persistently, and clarifies how
maintainers retry a partial PyPI upload.
2026-12-01 11:45:04 -08:00
Jacky Hsu 82620b1b8e docs: fix the hybrid search walkthrough (#5334)
## Summary

- Import `lancedb` before the Embedded Python connection example uses
it.
- Explain how to use the default RRF reranker when skipping the optional
setup step in Python or TypeScript.

## Testing

- Ran the original walkthrough in fresh Python 3.12 and Node.js 24
processes. The Python connection raised `NameError`, and skipping the
optional reranker setup raised `NameError` in Python and
`ReferenceError` in TypeScript.
- Ran the updated steps with the published LanceDB 0.42.0 Python and
Node SDKs, real Embedded tables and full-text indexes, and deterministic
test embeddings. Both explicit and default RRF returned the same four
rows in the same order and with the same relevance scores in each SDK.

- Checked the edited page with Vale 3.24.0 and checked the staged diff.

AI assistance disclosure. OpenAI Codex reproduced the errors, prepared
the documentation change, and ran the checks.
2026-12-02 03:25:56 +08:00
193c9d8e2e docs: fail docs build on warnings (#3707)
## Summary

- run the existing MkDocs deployment build in strict mode
- turn documentation warnings, including unresolved references, into CI
failures instead of deploying them

## Why

The docs workflow currently completes when MkDocs emits warnings. Using
MkDocs' built-in strict mode makes the deployment stop on those warnings
and surfaces documentation problems immediately. This addresses the
warning-detection portion of #572 without adding another dependency or
duplicating the docs build.

## Validation

- `git diff --check`
- parsed `.github/workflows/docs.yml` with PyYAML
- full `mkdocs build --strict` was not run locally because MkDocs is not
installed; the existing docs workflow has the required dependencies

---------

Co-authored-by: Will Jones <willjones127@gmail.com>
Co-authored-by: Xuanwo <github@xuanwo.io>
2026-12-02 02:03:26 +08:00
BHAWESHBHASKARandXuanwo fb853bae75 feat(nodejs): expose the NGram scalar index (#4908)
The Rust core (lancedb::index::scalar::NGramIndexBuilder) and the Python
SDK already support the NGram scalar index, and the Node.js SDK can
create one on Embedded with `Index.plugin("ngram")`. This change adds a
dedicated `Index.ngram()` factory. NGram is a scalar index on a UTF-8
string column that accelerates substring filters such as contains(col,
'needle'), along with some LIKE and regular-expression predicates, by
narrowing a scan to rows that share the query's trigrams.

Add an ngram() napi factory and Index.ngram() in the TypeScript SDK,
mirroring the existing btree and fm scalar index factories, with tests
for both factories. On Embedded, the query plan uses the index and the
exact substring filter excludes rows that only share the query’s
trigrams. On Enterprise, `Index.ngram()` sends `index_type: "NGRAM"`,
while `Index.plugin("ngram")` sends `index_type: "PLUGIN"` with
`plugin_type: "NGRAM"`.

---------

Co-authored-by: Xuanwo <github@xuanwo.io>
2026-12-01 21:39:01 +08:00
SHAIK SHIVAJIandXuanwo 144c07cee3 feat(nodejs): expose code analyzer options on FtsOptions and tokenize (#4889)
Completes #4364 together with #4756, which did the Python side.

## Changes

- `Index.fts()` / `FtsOptions` and `tokenize()` gain `analyzer`
(`"text"` or `"code"`), `splitIdentifiers`, `splitOnNumerics`,
`preserveOriginal` and `indexOperators`. All are optional, so existing
indexes and calls behave as before.
- Validation matches the Python SDK: `analyzer: "code"` with a
`baseTokenizer` other than `"code"` or `"simple"` is rejected,
`analyzer: "text"` with `baseTokenizer: "code"` is rejected, and turning
on a code flag without the code analyzer is rejected. Passing a flag as
`false` is always allowed. The checks live in one helper used by both
`fts` and `tokenize`.
- The option docs state the defaults (`analyzer: "code"` alone keeps
identifiers whole; `splitOnNumerics` and `preserveOriginal` only matter
with `splitIdentifiers: true`) and link the two Lance limitations noted
on #4756 (lance#9674 and lance#9658).

Shared presets can still include extra fields. For example, a preset can
carry the index name for `createIndex()` alongside the analyzer options
used by `Index.fts()` and `tokenize()`.

## Tests

The Node tests check exact tokens from both the named index and
standalone tokenization, whole identifiers, subword matches, shared
presets and invalid combinations of known options. With the rebuilt
native addon, the full local Jest run passed 2,045 tests across 37
suites, with 27 tests skipped. TypeScript checks, lint and API reference
regeneration also passed.

---------

Co-authored-by: Xuanwo <github@xuanwo.io>
2026-12-01 20:58:15 +08:00
Lance Release 2cc9cdfac4 Bump version: 0.42.0-beta.38 → 0.43.0-beta.0 2026-12-01 12:43:00 +00:00
Yang Cen 155457d0e5 feat(query): allow unordered vector and full-text search results (#5328)
## Summary

Callers that consume every selected hit can relax the final output order
with `ordered_results(false)` in Rust, `ordered_results(False)` in
Python, or `orderedResults(false)` in TypeScript. Ranked output remains
the default. The option preserves top-k selection, each hit’s score and
projected columns, and the existing rules for ties at the cutoff.

Embedded passes eligible queries to the Lance scanner. Enterprise sends
`"ordered": false` for eligible searches and omits the field by default.
Explicit sorting, positive offsets, batch vector queries and inputs to
hybrid fusion or reranking keep their existing order.

## Validation

A managed Linux preview passed 8 Rust wire cases, 4 Embedded Python
cases, 10 HTTP mock cases and all 52 TypeScript query tests. The preview
used a candidate Lance revision. Project CI on this PR validates the
integration with the official Lance `v16.0.0-beta.6`.

Uses the official Lance dependency from #5327, now merged into `main`.
2026-12-01 20:41:37 +08:00
belovafandXuanwo bd37cb0cd1 feat(rust)!: expose vector query partition parallelism (#5054)
BREAKING CHANGE: Callers that initialize `VectorQueryRequest` with an
exhaustive struct literal must add `query_parallelism: None` to preserve
automatic scheduling.

Expose Lance's existing IVF partition-search concurrency control through
the Rust `VectorQuery::query_parallelism` builder. This lets callers
override the automatic sequential policy used by flat sub-indexes
without changing the probe budget or bypassing LanceDB's query API.

The setting is optional, so existing queries keep their behavior.
Accepted values match Lance: `0` for automatic selection, `-1` for the
CPU pool, `1` for sequential execution, and positive limits for
partition-parallel execution. Values below `-1` are rejected, including
requests constructed directly through public fields.

An ordinary Embedded IVF query applies the setting within each index
segment. Separate segments may run concurrently. If the selected plan
uses shared batch IVF, an explicit value returns `NotSupported` because
its scheduler controls its own load and scoring windows. Leaving it
unset preserves batch execution. Enterprise also returns `NotSupported`
before sending an explicitly configured query because its request
contract does not support this setting. Namespace queries with explicit
settings route locally. The existing ordering, scan-order and RTE checks
remain in effect.

The tests cover single-segment IVF values and result equivalence,
two-vector Embedded batch execution with the option unset and rejected
explicit settings, Enterprise default requests and rejection before HTTP
for explicit settings, direct invalid requests, and namespace/RTE
routing. The Rust API and vector-search guide document the per-segment
scope.

Lance already exposes this control (introduced in
https://github.com/lance-format/lance/pull/6475); this PR exposes it at
the LanceDB Rust layer.

---------

Co-authored-by: Xuanwo <github@xuanwo.io>
2026-12-01 18:30:56 +08:00
Tomwang.ethandtomwangcn 76c8bf335a fix: expose branch create_at and metadata in branches.list() for node and python (#4914)
Fixes #4849.

**Problem**
- TypeScript SDK: `Branches.list()` returned napi class instances whose
fields live on the prototype, so `console.log`, spread and
`JSON.stringify` showed `{}` (the exact symptom in the docs example).
`create_at` and `metadata`, which Lance already stores for every branch,
were not exposed at all.
- Python SDK: the `Branches.list()` dicts also dropped `create_at` and
`metadata`.

**Change**
- `nodejs/src/table.rs`: `BranchContents` stays a runtime napi class
export and gains `create_at` (Unix seconds) and `metadata`, populated
from the stored Lance branch contents. The `metadata` getter defines
every key as an own enumerable data property (`napi_define_properties`),
so keys like `__proto__` that ordinary map conversion would route to the
prototype setter are preserved.
- `nodejs/lancedb/table.ts`: the `Branches.list()` wrapper promotes all
fields (`parentBranch`, `parentVersion`, `createAt`, `manifestSize`,
`metadata`) to own enumerable properties on each returned instance by
reusing the class getters and setters, so spread and `JSON.stringify`
see them while `instanceof` keeps working. Its return type is
`ListedBranchContents`, which guarantees `createAt` and `metadata`.
- Public typing: the exported `BranchContents` type keeps its released
shape (`parentBranch`/`parentVersion`/`manifestSize` only), so values
and interfaces written against it stay assignable and extendable,
including a view whose `createAt` is a `Date` and an interface that
extends `BranchContents` with its own `metadata`. `ListedBranchContents
extends BranchContents` adds `createAt` and `metadata` as required
fields, and the exported `BranchContents` constructor value has its
`prototype` typed as `BranchContents`, so the class value and
`instanceof` checks are unchanged.
- `python/src/table.rs`: `Branches.list()` dicts now include `create_at`
and `metadata`.
- Docs: regenerated TypeScript API reference for the new shape, and the
branching guide now documents `createAt`/`create_at` (Unix seconds) and
`metadata`.

**Tests**
- `nodejs/__test__/table.test.ts`: a branch whose stored ref file
carries non-empty metadata (including a `__proto__` key) and a known
creation time in Unix seconds is listed with both, as a `BranchContents`
instance with own enumerable fields, surviving spread and a JSON
round-trip with every metadata key intact. A second test covers the
consumer type contracts with `tsc`: a released-shape value with an extra
`createAt: Date` stays assignable to `BranchContents`, an interface
extending `BranchContents` can declare its own `metadata` shape, the
exported constructor's `prototype` is typed as `BranchContents`, and
`branches.list()` results guarantee `createAt` and `metadata`.
- `python/python/tests/test_table.py::test_branches`: same
non-empty-metadata (with `__proto__`) and known-`create_at` coverage.
- Verified locally on Linux x86_64: `tsc -b`, Biome checks, regenerated
docs diff limited to the `BranchContents` pages, node branches suite (34
passed), python `test_branches` (4 passed, 1 skipped).

---------

Co-authored-by: tomwangcn <tomwangcn@users.noreply.github.com>
2026-12-01 17:29:44 +08:00
KeeProMiseandXuanwo a85cb92ffd feat: support vector-only and FTS-only reranking (#3024)
Add rerank_vector() and rerank_fts() methods to Reranker trait, allowing
rerankers to work with single search modes instead of only hybrid
search.

Implemented for:
- RRFReranker (Rust and Python)
- LinearCombinationReranker (Python)

Resolves TODO at rust/lancedb/src/rerankers.rs:55

Changes:
- Extended Reranker trait with default implementations
- Added unit tests for new methods
- Updated documentation with examples

---------

Co-authored-by: Xuanwo <github@xuanwo.io>
2026-12-01 17:07:02 +08:00
lipeh1andlipeih 45718a938c test(node): speed up Jest transforms with SWC (#5182)
Jest now uses SWC to transpile the Node SDK tests, with the same ES2022
target and legacy decorator semantics as the SDK. The Node and Arrow
compatibility jobs run the existing test TypeScript project through `tsc
--noEmit` after building the SDK. Contributors can run that check with
`pnpm run typecheck:tests`.

Closes #2234.

Measured on Windows x64 with Node 22.23.4, Jest 29.7, the default native
features and one Jest process (`--runInBand --silent`). Both runs used
the same 0.42.0-beta.26 Windows native binary. Times below are
wall-clock seconds.

| Workload | ts-jest | SWC |
| --- | ---: | ---: |
| Six suites, empty Jest cache (median of three) | 8.31 | 4.22 |
| Same six suites, populated cache (median of three) | 4.45 | 3.52 |
| Full default suite, empty Jest cache (one run each) | 50.10 | 38.55 |

The six suites were `arrow`, `expr`, `materialized_view`, `package`,
`registry` and `sanitize`. Each pair started with a fresh Jest cache
directory and immediately reused it on the second run. The separate test
type check took 3.39 s, bringing the full SWC run plus type checking to
41.94 s on this machine.

Both full runs passed the same 1,882 tests with 28 skipped. The SDK
TypeScript build, test type check, Biome checks and TypeDoc build also
passed.

---------

Co-authored-by: lipeih <lipeihan@eazytec.com>
2026-12-01 14:04:35 +08:00
Alex Shen 08911d6378 docs: import LanceDB in the NVIDIA example (#5320)
## Summary

The first Python example in the NVIDIA Nemotron guide calls
`lancedb.connect` without importing `lancedb`. Import the module so
readers can run the example in a fresh Python session.

## Test plan

- Ran the first fenced Python example from the guide in a fresh
namespace. The original raised `NameError` at the connection call.
- Reran the changed example with SDK stubs. It reached table creation,
insert, and search without calling a live NVIDIA endpoint.
- Checked that the diff changes only the import.

AI assistance disclosure. OpenAI Codex helped prepare and verify this
documentation change.
2026-12-01 12:06:08 +08:00
yuzhouandXuanwo b3ad97a28d feat(node): surface Rust errors as typed JavaScript errors (#4901)
## Summary
The Node SDK now throws typed `LanceError` subclasses instead of one
generic `Error` with an indented `Caused by` string.

Fixes #222

## Before / after
```ts
try {
  await db.openTable(\"missing\");
} catch (error) {
  if (error instanceof TableNotFoundError) {
    error.code;       // \"TableNotFound\"
    error.tableName;  // \"missing\"
    error.message;    // \"Table 'missing' was not found\"
    error.cause;      // underlying dataset error
  }
}
```

## Changes
- `nodejs/src/error.rs` — map each `lancedb::Error` variant to a
one-line header + `error.cause`
- `nodejs/src/query.rs`, `nodejs/src/merge.rs` — pass errors through
instead of stringifying
- `nodejs/lancedb/errors.ts`, `errors_install.ts` — real subclasses when
the package loads
- Tests + generated API docs under `docs/src/js/`

## Test plan
- [x] Native debug build, `tsc`, Biome, `cargo clippy -p lancedb-nodejs`
- [x] Jest: new error tests, remote retry, connection/query/table (594
passed)

## Notes
Node-API cannot construct a custom `Error` subclass from an async Rust
rejection, so translation happens in JS when `@lancedb/lancedb` loads.
Calling the raw native addon without that entrypoint still shows the
header line.

---------

Signed-off-by: ZYZ666-RGB <1991039819@qq.com>
Signed-off-by: yuzhou <1991039819@qq.com>
Co-authored-by: Xuanwo <github@xuanwo.io>
2026-12-01 11:28:22 +08:00
071c220713 docs: clarify embedding comparisons in time-travel RAG (#5318)
## Summary

Clarify what the Time-Travel RAG example demonstrates. It retrieves
different top documents with two embedding models. Distances are
measured within each model's embedding space. The text now gives readers
a way to evaluate relevance with the same queries and labeled judgments,
and links to the current embedding guide outside the terminal excerpt.

## Validation

Checked that the revised excerpt preserves the two recorded results and
that `/embedding` resolves to the embedding guide. A small Euclidean
example confirmed that rescaling embeddings can change distances while
preserving the ranking. The diff check passed. Validation covered the
tutorial text, link, and numeric example.

AI disclosure — OpenAI Codex checked the upstream recipe and
documentation, edited the tutorial, and validated the example and link.

Co-authored-by: AlexShen-Oguri <176059206+AlexShen-Oguri@users.noreply.github.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
2026-12-01 11:06:05 +08:00
Tomwang.ethandXuanwo 7efeb06bc5 fix(node): reject non-integer values for integer-only numeric options (#4916)
## Problem
Several Node APIs accept integer-only options but pass JavaScript
numbers straight to integer N-API parameters. Fractional values are
silently truncated, so `checkout(1.5)` checks out version 1,
`tags.create("v1", 1.5)` pins version 1, `limit(2.5)` returns two rows,
and bucket `numBuckets: 2.5` enables two buckets instead of rejecting
the input. Negative or out-of-range values also reach Rust after lossy
conversion.

## Change
- The native `Tags` export is kept: code registering `Tags` as a `new ()
=> Tags` constructor still compiles. Validation for tag versions happens
in `Tags.prototype.create`/`update` wrappers, and #5145's
`tags.create(name)` and `tags.create(name, null)` behavior (tag the
handle's visible version) is preserved and tested.
- `checkout(version)` validates numeric versions as non-negative
integers before conversion.
- `numBuckets` is checked only for the `bucket` write spec and must be
an integer in 1–1024 before native conversion; `identity` and
`unsharded` specs ignore it.
- `limit` on plain and vector queries is checked against the native
`u32` range (0–4294967295) before conversion, covering the upper
boundary; `limit(0)` still returns no rows from plain queries.
- `nprobes`, `minimumNprobes`, `maximumNprobes`, `ef` and `refineFactor`
reject non-integers via the existing `validateNonNegativeInteger`.
Fractional `searchEffort` stays valid and is covered by a positive
regression assertion. Branch APIs are outside this patch.

This does not change the separate `TagContents` serialization fix in
#4915, and is based directly on main rather than stacked on it. This is
not a complete audit of numeric options.

## Validation
- New regression tests: fractional checkout version; non-integer tag
create/update versions plus `create(name)`/`create(name, null)`
preserved; non-integer query options with `searchEffort` positive case;
`limit` u32 upper boundary accepted, one-past rejected, `limit(0)`
returning no rows; `numBuckets` fractional/0/1025 rejected for `bucket`
and ignored by `identity`/`unsharded`.
- All pass locally on Linux x86_64 against a native build from main;
`tsc -b` and Biome checks pass. TypeScript-only change; Rust and Python
sources unchanged.

---------

Co-authored-by: Xuanwo <github@xuanwo.io>
2026-12-01 10:24:46 +08:00
Xuanwo ca4c2ae5de docs: document streaming Blob outputs for Functions (#5307)
The Function guides still hide their `BlobWriter` guidance. LanceDB
Enterprise 1.16.0 ships the server and worker support for computed
column refresh, and the paired Python SDK `0.42.0b38` includes #5171.
Show how to register a writer-based Function with that release pair and
when to keep returning `bytes`.

Both pages were rendered locally before and after the change. The
updated HTML includes the release pair, writer annotations, and plain
SQL `SELECT` fallback.

For the release pairing, we checked that the Enterprise 1.16.0 release
commit contains the server and worker implementation and that the image
digests promoted for release match the qualified bundle. We also
compared `functions.py` and `_blob_writer.py` in the released Linux
wheel with their tagged sources. Both files matched byte for byte. [SDK
release
source](https://github.com/lancedb/lancedb/tree/v0.42.0-beta.38/python/python/lancedb)
2026-12-01 01:46:08 +08:00
Yang Cen af23585259 docs(sql): clarify JSON scalar index eligibility (#5306)
The JSON function reference promises index acceleration for every
accessor. Document the key and type requirements for typed lookups,
explain serialized ordering for `json_extract`, and link to `EXPLAIN` so
readers can check their plan.

Checked the examples against LanceDB's pinned Lance implementation and
verified the documentation link and `git diff --check`.

Related to lance-format/lance#8806.
2026-12-01 00:35:43 +08:00
c105797249 fix(node): contain rejected table write progress callbacks (#5274)
Fixes #5273

## Summary

Handle promises returned from `Table.add(..., { progress })` through the
existing callback warning path. The callback stays unawaited and the
write does not depend on its result. The patch covers write progress in
the native append path, which is separate from `Job.wait` progress.

## Validation

- The real native append regression resolves the write, reads its newly
committed rows, and then rejects the final progress callback. All seven
Apache Arrow variant cases fail on main because the warning is missing.
- With the patch, 28 append, overwrite, and progress tests pass with the
matching native beta binding.
- An actual Node run with `--unhandled-rejections=strict` exits on the
observer error on main. The patch logs the warning and reads three
expected rows.
- Biome checks on changed files and `git diff --check` pass.

---------

Co-authored-by: Divyam Talwar <237515611+DivyamTalwar@users.noreply.github.com>
Co-authored-by: Divyam Talwar <DivyamTalwar@users.noreply.github.com>
2026-11-30 21:46:22 +08:00
c90382e9c4 fix(node): handle rejected job progress callbacks (#5272)
Fixes #5271

## Summary

A promise returned from a job progress callback could reject outside the
SDK's synchronous error handler. This calls the observer synchronously
as before and attaches a rejection handler without awaiting it.

## Validation

- The regression test holds the observer promise open until `Job.wait`
completes, then rejects it and verifies the warning.
- All 4 tests in `nodejs/__test__/job.test.ts` pass using the native job
boundary stub and the published matching beta native declarations.
- A separate actual Node run with `--unhandled-rejections=strict` exits
at the observer error on main. It logs the error and continues with the
patch.
- Biome lint and format checks passed on the two changed files. `git
diff --check` passed.

---------

Co-authored-by: Divyam Talwar <237515611+DivyamTalwar@users.noreply.github.com>
Co-authored-by: Divyam Talwar <DivyamTalwar@users.noreply.github.com>
2026-11-30 21:46:02 +08:00
80c889cd9e docs: explain merge insert execution costs (#4501)
resolves #4258

## Summary

- document how indexed partial-column merges patch columns across
touched fragments
- explain how full-scan merges rewrite rows and can materialize the
target table
- describe the index-coverage, batching, and memory tradeoffs
- align the Python, Rust, and TypeScript `use_index` API documentation

## Verification

- `git diff --check`
- Ruff 0.15.20 formatting check for `python/python/lancedb/merge.py`
- Biome 1.9.4 check for `nodejs/lancedb/merge.ts`
- reviewed the rendered MDX structure and cross-SDK wording

The TypeDoc generation command was also attempted. It cannot complete in
this checkout because the Rust-generated `nodejs/lancedb/native.d.ts`
artifact is absent and Rust tooling is not installed; TypeDoc stops on
the resulting pre-existing module-resolution errors before generating
output.

---------

Signed-off-by: Himanshu S <me.mrhimanshu@gmail.com>
Co-authored-by: Himanshu <18554133+mrhimanshu@users.noreply.github.com>
Co-authored-by: Himanshu S <me.mrhimanshu@gmail.com>
2026-11-30 21:23:27 +08:00
Juampi 0ba8b6f0a8 docs: add Firecrawl integration page (#4706)
I work at Firecrawl. This adds a Firecrawl page to Integrations > Data
Platforms & Frameworks: a Python recipe that crawls a site with
Firecrawl, stores the pages as Markdown chunks with their source URL in
a LanceDB table that embeds them through the embedding registry,
searches the table, and then adds web search results to the same table.

It follows the docs workflow in CONTRIBUTING.md:

- The example is a test, `docs/web-tests/py/test_firecrawl.py`, split
into five `--8<--` snippets. Like the other integration snippets that
need a provider key, it skips unless `FIRECRAWL_API_KEY` is set.
- `docs/web/snippets/firecrawl.mdx` is generated from it with `uv run
docs/web-tests/mdx_snippets_gen.py -s docs/web-tests/py -s
docs/web-tests/ts -s docs/web-tests/rs -o docs/web/snippets`. The
generator also rewrites other snippet files on current `main` without
this change, so I left those out.
- `docs/web/integrations/data/firecrawl.mdx` imports the snippets with
`<CodeBlock>` like the dlt page, and every heading has an explicit
`{#anchor}`.
- `docs/web/docs.json` adds the page at the end of the Data Platforms &
Frameworks group.

The embedding function is `sentence-transformers` with
`all-MiniLM-L6-v2`, so the recipe needs no API key besides Firecrawl's.
Each Firecrawl call passes `integration="_lancedb"`, a label that tells
Firecrawl a request came from this guide; the page says it is optional.
It needs `firecrawl-py` 4.3.3 or later.

## Testing

```
$ FIRECRAWL_API_KEY=... pytest docs/web-tests/py/test_firecrawl.py -v
test_firecrawl.py::test_firecrawl_crawl_and_search PASSED     (lancedb 0.40.0, Python 3.12)
$ pytest docs/web-tests/py/test_firecrawl.py -rs              (no key)
SKIPPED [1] Set FIRECRAWL_API_KEY to run this integration snippet
$ ruff format --check docs/web-tests/py/test_firecrawl.py && ruff check docs/web-tests/py/test_firecrawl.py
1 file already formatted
All checks passed!
```

Regenerating the snippets from the test produces the same
`docs/web/snippets/firecrawl.mdx`. I have not run the Mintlify site
checks (`mint validate`, broken-links), so please run them in CI or on
your side.

I drafted this with an AI coding assistant and ran the test above
myself.
2026-11-30 21:13:16 +08:00
Haocheng LiuandHaocheng Liu 80582fb87d docs: fix training and dedupe examples (#4932)
## Summary

- Save per-rank dataset checkpoints to separate files and load the
matching file when resuming.
- Add the missing LanceDB import to the data loader example.
- Correct the count of distinct rows in the deduplication example.

## Validation

- `git diff --check`
- Parsed the Python snippets in the affected training pages with
`ast.parse`.

---------

Co-authored-by: Haocheng Liu <haocheng.liu@general-int.com>
2026-11-30 21:09:38 +08:00
lancedb-gatefixer[bot] d9db83de65 fix!: guard remote index routes against dot segments (#5013)
BREAKING CHANGE: Older Enterprise index listings that require per-index
statistics now omit historical entries with empty names, `.` or `..`.
Remote index operations reject these unaddressable names. Operators
needing to remove such entries can use server-side maintenance; direct
native access also supports cleanup. Ordinary index names and
`exist_ok=True` reuse require no migration.

Fixes #5007

Remote index URLs previously allowed `.` and `..` as path segments.
Reqwest normalizes them, so dropping an index named `..` could send the
table-level drop request and delete the table.

Guard the remote statistics, prewarm, and drop routes against empty
names, `.` and `..`, then percent-encode all other names. Index creation
retains its existing name policy on both backends, including names such
as `Customer lookup` and `café_idx` and reuse through `exist_ok=True`.
The same remote guard applies on checked-out branches.

Enriched Enterprise listings retain these entries without issuing stats
requests. Native cleanup is covered by a regression test. API
documentation explains these limits, and website release guidance
remains a non-rendering draft.

Validation:

- Before the review fix, 12 of 15 focused regressions failed,
reproducing valid-name rejection, generated-name reuse failure, and
mixed legacy-list failure.
- 60 focused Rust tests passed, covering unsafe routes, encoded names,
mixed legacy/enriched listings, generated names, native and Enterprise
lifecycles, checked-out branches, and `exist_ok` preservation of index
identity, definition, and table version.
- Rebuilt the Python extension in the uv-managed environment from
`python/uv.lock`; all 28 targeted Python tests passed, including both
names and synchronous/asynchronous `exist_ok` reuse.
- Node native build, TypeScript type checking, lint/format checks, four
targeted index tests, and generated API documentation passed.
- Rust formatting, Clippy (`remote`, tests and examples), Python
formatting/lint, repository-wide Typos 1.26.0, and `git diff --check`
passed. Native builds used the repository `ci` profile with
`remote,lancedb/metrics-otel` enabled for Python and Node.
- Repository-root Ruff lint reports 59 existing errors in unchanged
`docs/web-tests`; Python-package lint passes.

<!-- lance-gatekeeper-fix:v1 agent=1ef05de7bc00306ccd6f8a60b9a81003
generation=1 -->

<!-- gatefixer-walkthrough:v1
head=6b25e10810ea1d11a4ef56be63c4ef50225f65d6 -->
## Change walkthrough

```mermaid
flowchart TD
    entry["Listed index"] --> typed{"Type available?"}
    typed -->|Yes| include["Include index"]
    typed -->|No| safe{"Addressable name?"}
    safe -->|No| omit["Omit entry"]
    safe -->|Yes| stats["Encode and fetch stats"]
    stats --> include
```

Creation preserves existing name support; remote routes reject only
empty names, `.` and `..`.

**Read:** [Route
guard](https://github.com/lancedb/lancedb/blob/6b25e10810ea1d11a4ef56be63c4ef50225f65d6/rust/lancedb/src/remote/table.rs#L102-L112)
→ [Listing
fallback](https://github.com/lancedb/lancedb/blob/6b25e10810ea1d11a4ef56be63c4ef50225f65d6/rust/lancedb/src/remote/table.rs#L2534-L2596)
→ [Index-preservation
regression](https://github.com/lancedb/lancedb/blob/6b25e10810ea1d11a4ef56be63c4ef50225f65d6/rust/lancedb/src/table/create_index.rs#L1431-L1481).

<sub>Snapshot:
[6b25e10](https://github.com/lancedb/lancedb/commit/6b25e10810ea1d11a4ef56be63c4ef50225f65d6)</sub>
<!-- gatefixer-walkthrough:end -->

---------

Co-authored-by: Gatefixer <313497061+lancedb-gatefixer[bot]@users.noreply.github.com>
2026-11-30 20:51:19 +08:00
Sudhir Vissa 97c88659f4 fix(python)!: fetch minimum rank-fusion window per side in hybrid search (#4772)
BREAKING CHANGE: Executing or analyzing an async Python hybrid query
with `limit(0)` now raises `ValueError` before either search runs. In
0.41.0, `offset(2).limit(0).to_arrow()` returned a typed empty table
after retrieval and reranking. Skip query execution and `analyze_plan()`
when the requested page size is zero.

Refs #4758

## Problem
Each side of a hybrid query fetched only `limit + offset` rows before
rank fusion, so asking for fewer results could return a different top
result instead of just a shorter list.

Repro (lancedb 0.41.0, 300 rows, RRF reranker):
- `limit=1` -> top id 294
- `limit=10` -> top id 269

## Fix
With the default RRF reranker, both hybrid paths
(`LanceHybridQueryBuilder._create_query_builders` and
`AsyncHybridQuery._create_child_queries`) now fetch `max(limit + offset,
DEFAULT_HYBRID_RANK_WINDOW)` rows per side, with
`DEFAULT_HYBRID_RANK_WINDOW = 50`. The requested limit/offset window is
still sliced out of the fused results as before. This implements option
1 from the issue: a fixed minimum window, no new API surface.

Custom and model rerankers keep the caller's `limit + offset` budget per
side, since every candidate is sent to them (for example
`OpenaiReranker` puts all merged texts in one prompt). Callers who want
a wider window for those rerankers can raise `limit()`. An explicit
`limit(0)` never gets the floor. In the async builder it raises
`ValueError` before schema discovery or either sub-query runs, with or
without an offset, so neither Embedded nor Enterprise retrieves or
scores anything. On main, async `limit(0)` was rejected by the native
`k` check only without an offset; `offset(2).limit(0)` fetched and
reranked two rows per side and returned nothing. The sync builder still
treats `limit(0)` as the default of 10, as before.

Trade-off: default RRF queries with small limits now fetch up to 50 rows
per side, and their result orderings can change, which is the bug being
fixed.

## Tests
- `test_hybrid_query_top_result_stable_across_limits` and its async
mirror (issue repro): fail on base, pass with the fix
- `test_hybrid_query_custom_reranker_keeps_candidate_budget` and its
async mirror: a recording reranker receives 1 vector and 1 FTS candidate
for `limit(1)` and 5 of each for `offset(2).limit(3)`
- `test_async_hybrid_query_default_rrf_candidate_window`: default RRF
receives 50 of each for `limit(1)`
- `test_async_hybrid_query_empty_page_does_not_fetch_candidates` (offset
0 and 2): `limit(0)` raises, and neither sub-query nor the reranker runs
- `test_remote_db.py::test_async_hybrid_zero_limit_sends_no_query`
(offset 0 and 2): `limit(0)` raises and no `/query/` request is sent;
fails on 281fdc7, passes on this head
- `test_remote_db.py::test_query_sync_hybrid` now expects `k=50` for the
default RRF request with `limit(42)`
- `test_hybrid_query.py`: 30 passed, 1 failed. The failure is
pre-existing and unrelated
(`test_hybrid_query_with_stale_fixed_size_binary_prefilter` needs the
`lance` package)
- `test_wal_hybrid.py`: 15 passed
- `ruff check` and `ruff format --check` clean on the touched files

Local runs used the lancedb 0.41.0 wheel with this PR's `query.py` diff
applied, since main needs a newer native extension than the published
wheel. `test_query_sync_hybrid` and the new remote zero-limit test were
run from an extracted copy because `test_remote_db.py` imports
`lancedb.graph`, which 0.41.0 does not have.

---------

Signed-off-by: shadowmodder <sudhirvissa@gmail.com>
Signed-off-by: Sudhir Vissa <sudhirvissa@gmail.com>
2026-11-30 20:42:12 +08:00
lipeh1andlipeih 058ed93618 feat(python): support table checkout by timestamp (#5221)
Python callers can pass a `datetime` to `Table.checkout()` and
`AsyncTable.checkout()` to read several tables as of a single cutoff.
Each table is pinned to the highest retained version on its current
branch whose reported commit timestamp is at or before the cutoff. A
cutoff before all retained versions raises `ValueError`.

The Rust `Table::checkout_as_of` method scans the branch's retained
history and compares the commit timestamps at the precision supplied by
the backend. On Embedded it resolves and checks out the version on the
same dataset. If a concurrent tag checkout moves the handle to another
branch, it retries there before pinning the handle. On Enterprise it
follows all version-history pages on the same branch before checking out
the selected version. Servers that report only whole milliseconds can
group commits on opposite sides of a cutoff. For an exact reread, record
both the branch and version of each input after checkout, then reopen
the table with both values. Python interprets naive datetimes in the
system's local time zone and honors explicit UTC offsets.

The website guide includes a draft paragraph for the SDK release.

Closes #2293.

## Validation

- Built the Windows x64 native extension from this checkout with the
repository's `ci` profile and CPython 3.12.
- `test_table.py` passed 558 tests with 20 skips. `test_remote_db.py`
passed 759 tests with 2 skips using its HTTP test server.
- The new tests cover two tables at one cutoff, pinning after later
writes, recovery with `checkout_latest()`, a cutoff before the first
version, non-UTC input, tied commits, and a commit one nanosecond past
the cutoff. All three also passed with `TZ=EST5EDT`.
- A real Embedded handle switching branches during timestamp lookup
selected the wrong branch version in 40/40 attempts before the
concurrency fix and the expected version in 40/40 attempts afterward.
The Rust regression test forces that interleaving with a
filesystem-backed table.
- A two-page Enterprise HTTP fixture reproduced checkout at v1 with the
previous SDK and confirmed checkout at v2 after the fix. The Rust
regression asserts the branch and continuation token on page two and
reads back the pinned version. A separate test covers empty intermediate
pages and repeated tokens.
- Both Rust branch checkout tests and the `Table::checkout_as_of`
doctest passed with the `remote` feature enabled.
- Python SDK Ruff checks and formatting, Pyright, Rust formatting, and
Vale passed. Repository-wide Ruff reports 59 existing diagnostics in the
unchanged `docs/web-tests` files.

---------

Co-authored-by: lipeih <lipeihan@eazytec.com>
2026-11-30 20:40:10 +08:00
Ayanna Bansal 14e49a6710 fix(node): infer a timestamp type for Date values (#5232)
`createTable` and `makeArrowTable` reject a JavaScript `Date` when no
schema is given:

```ts
await db.createTable("events", [{ id: 1, created: new Date() }]);
// Error: Failed to infer data type for field created at row 0. Consider providing an explicit schema.
```

Row validation already lets `Date` through as a supported value, and the
same rows work with an explicit `Timestamp` schema, but `inferType` has
no branch for it, so inference gives up.

This change:

- infers `Timestamp<MILLISECOND>` for a `Date`, which is also what
Apache Arrow's own `vectorFromArray` infers and matches the precision of
a JS `Date`. A list of dates is inferred as a list even when the column
name looks like a vector column;
- writes `Timestamp(ms)` columns, and lists of them at any depth, as
signed 64-bit values in `makeVector`. `apache-arrow@15.0.0` rounds the
high 32 bits of a negative timestamp toward zero, so `new Date(-1)` came
back as 4294967295. This already affected an explicit `Timestamp(ms)`
schema on Arrow 15; inference would have made it easier to hit. `Date`,
integer and bigint values take the new path; anything else (fractional
numbers, strings, list values that are not arrays or typed arrays) is
left to Arrow exactly as before;
- rejects an Invalid Date with a clear error. Arrow 15 stored it as
1970-01-01 and newer versions threw a BigInt conversion error;
- documents the new rule in the `makeArrowTable` docstring and the
generated API page.

Not changed (explicit schemas only, behaviour as before this PR):
timestamp units other than milliseconds, timestamps inside a
`List<Struct>`, `FixedSizeList` or `Map`, and `Date` query parameters in
`sql.ts`. On Arrow 15 these still go through Arrow's conversion. I can
follow up on them separately if wanted.

Tested:
- New tests in `__test__/arrow.test.ts`: the type is inferred; values
and nulls round-trip; a `Date` mixed with a string is still rejected;
dates before 1970 survive IPC as scalars, in lists, nested lists and
structs, with and without a schema; epoch numbers, bigints and typed
arrays keep working in explicit timestamp columns; Invalid Date is
rejected in every shape.
- `jest __test__/arrow.test.ts` passes with `apache-arrow` resolved to
15.0.0, 16.0.0, 17.0.0 and 21.2.0 (swapped the way the `arrow-compat` CI
job does). On 15.0.0 the pre-1970 tests fail without the workaround. CI
does not run Arrow 15, so on newer versions the Invalid Date test is
what fails if a shape stops reaching the new writer.
- `jest __test__/table.test.ts`, `biome ci .`, `tsc -b` and `pnpm run
docs` pass.
- Checked by hand that `createTable` then `add` with `Date` values
stores and returns them.

I ran the TypeScript tests against the published 0.42.0-beta.34 native
binary; I did not rebuild the Rust side, which this change does not
touch.
2026-11-30 20:38:59 +08:00
wangshun 04bf27af9d feat: support IN subqueries in Embedded search filters (#5223)
Fixes #5222

## Summary

Embedded vector and full-text searches rejected `IN (SELECT ...)`
because Lance's scanner parsed the filter as a single-table expression.
A team-scoped search with `limit(1)` needs to rank eligible documents
using keys from the sharing table.

Resolve unqualified lookup tables through the originating database and
use DataFusion to evaluate the predicate on the search snapshot. Pass
the matching row IDs to Lance before ranking. The syntax applies to
base-table prefilters within one namespace. Literal filters use the
existing scanner path.

## Tests

Tests: `/bin/sh -c 'cd nodejs && corepack pnpm test --runInBand
__test__/query.test.ts -t '"'"'prefilters by keys from another
table'"'"''`.
Result: cd nodejs && corepack pnpm test --runInBand
__test__/query.test.ts on the exact-HEAD published native binary before
adding tests: 41 passed.
Result: cd nodejs && corepack pnpm test --runInBand
__test__/query.test.ts -t 'prefilters by keys from another table' on the
exact-HEAD published native binary: 2 failed with the reported
unsupported SQL expression, exit 1 (OSSCOUT_BASE.log).
Result: cd nodejs && corepack pnpm lint: passed after correcting new
fixture key style.
Result: cargo fmt --all && git diff --check: passed.
Result: cd nodejs && corepack pnpm test --runInBand --runTestsByPath
__test__/expr.test.ts __test__/remote.test.ts on the exact-HEAD
published native binary: 179 passed across 2 suites.
Result: cd nodejs && corepack pnpm tsc && corepack pnpm run docs with
the exact-HEAD native declarations: passed, with no generated
documentation changes.
Result: cd nodejs && corepack pnpm build:debug --profile ci && corepack
pnpm tsc: passed from the patched source.
Result: cd nodejs && corepack pnpm test --runInBand
__test__/query.test.ts -t 'prefilters by keys from another table' on the
source-built patch: 2 passed, exit 0 (OSSCOUT_PATCHED.log).
Result: cd nodejs && corepack pnpm test --runInBand --runTestsByPath
__test__/query.test.ts __test__/expr.test.ts __test__/remote.test.ts on
the source-built patch: 225 passed across 3 suites, exit 0
(OSSCOUT_PATCHED.log).
Result: cd nodejs && corepack pnpm run docs on the source-built patch:
passed, with no generated documentation changes.
Regression coverage: `nodejs/__test__/query.test.ts`.
<!-- oss-scout-job:job-2628acdb-66f3-4d91-8a6e-d5d15e92bde7 -->

---------

Signed-off-by: wangshun <96341168+xixi-box@users.noreply.github.com>
2026-11-30 20:38:51 +08:00
wangshun 5db0513dd0 fix: validate scalar index types with Lance trainers (#5147)
Fixes #5133

## What changed

Use Lance's scalar training requests to validate resolved Arrow fields
and share the same Auto index selection across Embedded and Enterprise.
Auto chooses IVF_PQ for vector fields and BTree for supported scalar
fields.

## Why

LanceDB's copied type lists rejected Binary, LargeBinary, and LargeUtf8
fields that Lance can index. Explicit and automatic BTree creation now
accept those fields. BTree and ZoneMap retain a targeted guard on the
Arrow Null type because the pinned Lance build drops IS NULL matches
after either index is created. FTS and Bitmap continue to check the
relevant Arrow extension metadata.

Refs #5133.

## How it was tested

Tests: `cargo test --profile ci --locked --features remote -p lancedb
--lib table::create_index::tests::test_create_btree_on_binary --
--exact`.
Result: cargo test --profile ci --locked --features remote -p lancedb
--lib table::create_index::tests::test_create_btree_on_binary -- --exact
(base): expected failure, 0 passed and 1 failed, exit 101.
Result: cargo test --profile ci --locked --features remote -p lancedb
--lib table::create_index::tests:: (base): 28 existing cases passed, and
only the new regression failed, exit 101.
Result: target/ci/deps/lancedb-bb9dc6b24005d6a0
remote::table::tests::test_create_index
remote::table::tests::test_create_list_element_fts_requires_server_support
remote::table::tests::test_branch_create_index
utils::tests::test_fts_field_logical_type_validation (base binary): 14
passed, exit 0.
Result: cargo test --profile ci --locked --features remote -p lancedb
--lib --no-run (patched): an initial build exposed missing Enterprise
imports, which were restored before a successful rebuild.
Result: cargo test --profile ci --locked --features remote -p lancedb
--lib table::create_index::tests::test_create_btree_on_binary -- --exact
(patched): 1 passed, 0 failed, exit 0 in both runs.
Result: cargo test --profile ci --locked --features remote -p lancedb
--lib -- table::create_index::tests::
remote::table::tests::test_create_index
remote::table::tests::test_create_list_element_fts_requires_server_support
remote::table::tests::test_branch_create_index
remote::table::tests::test_list_indices_fts_public_list_path
remote::table::tests::test_list_indices_nested_field_paths
index::tests:: utils::tests:: (patched): 61 passed, 0 failed, exit 0.
Result: LANCE_FTS_FORMAT_VERSION=bad cargo test --profile ci --locked
--features remote -p lancedb --lib
utils::tests::test_fts_field_logical_type_validation -- --exact
(patched): 1 passed, 0 failed, exit 0.
Result: /tmp/osscout-candidate/null-probe (direct probe using the pinned
Lance build): IS NULL matched 2 rows before indexing, 0 after building a
BTree or ZoneMap, and 2 after building a Bitmap.
Result: cargo fmt --all -- --check and git diff --check passed.
Regression coverage: `rust/lancedb/src/table/create_index.rs`.
<!-- oss-scout-job:job-aa1c056f-6c0a-4141-adae-fe30d5ef896a -->

---------

Signed-off-by: wangshun <96341168+xixi-box@users.noreply.github.com>
2026-11-30 20:38:43 +08:00
Alex Castillo GonzálezandClaude Sonnet 5.5 d31c1568e0 fix(python)!: compute JinaEmbeddings.ndims() per model (#4840)
BREAKING CHANGE: `JinaEmbeddings.ndims()` previously returned 768 for
unlisted model names. It now raises `ValueError`. When creating a schema
with an unlisted model, pass its documented output width to
`Vector(width)`.

Fixes the `# TODO: fix hardcoding` in `JinaEmbeddings.ndims()` (same
kind of fix as #4737, which made the OpenAI-compatible models use their
real dimension).

**Root cause:** `ndims()` returned 768 for every model. Any model whose
default output is not 768 (jina-clip-v2 and jina-embeddings-v3: 1024,
jina-embeddings-v4: 2048, jina-embeddings-v2-small-en: 512) produced a
vector column of the wrong size.

**Fix:** per-model lookup table of default output dimensions, only for
models whose dimension is documented (model configs on Hugging Face
`hidden_size`/`projection_dim`, and https://jina.ai/models/ pages).
Unknown models raise a `ValueError` listing the supported names instead
of silently guessing 768. The default `jina-clip-v1` still returns 768.
When appending to a table, generated vectors are validated against the
width of the stored fixed-size column, so existing tables that use an
unlisted model keep working.

**Test:** `python/tests/test_jina_embeddings.py` (no network, no API
key), including reopening a table with an unlisted model, appending a
matching vector and rejecting a mismatched width.

This change was prepared with an AI coding assistant (Claude).

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-30 20:23:42 +08:00
Kevin Dong 2ff3bee923 feat(node): expose ZoneMap and BloomFilter index configs (#4962)
## Summary

Refs #4931 (TypeScript portion).

Expose the existing Rust ZoneMap and BloomFilter builders through
`Index.zoneMap()` and `Index.bloomFilter({ numberOfItems?, probability?
})` for Embedded and Enterprise tables. Export `BloomFilterOptions`,
reject values that cannot be converted losslessly from a positive
JavaScript safe integer to Rust `u64`, and retain the core builder's
probability validation and defaults.

Include API examples, generated documentation, and the ZoneMap
table-capability compatibility warning. Synchronize with main while
preserving its RTree/plugin factories and source-bearing Blob APIs. The
Python portion remains separate.

## Validation

- Built the new native binding on macOS 15.7.9 / arm64 with Rust 1.98.0,
Node 24.22.1, the repository `ci` profile, locked dependencies, and
Rust's bundled LLD scoped to the Node binding. Both lockfiles match
main.
- Four full affected Jest suites: **819 passed, 3 existing
experimental-feature cases skipped**. Coverage includes index
creation/listing, range and membership plans/results, option boundaries,
Enterprise HTTP request bodies, and the newly merged Blob descriptor
API.
- Passed TypeScript compilation, Biome check/format for all 85 Node
files, generated API documentation with warnings treated as errors, Rust
formatting, and `git diff --check`.
- Independent execution in a separate writable snapshot: 56
reviewer-designed boundary cases passed on each of Node 22 and 24; 815
adjacent repository tests passed, with 3 existing skips. TypeScript,
generated docs, Biome, and the compiled package entry point passed. The
final source tree, complete diff, and freshly built native artifact
hashes matched; no actionable findings remained.

The final documentation correction was checked against the pinned Lance
source. TypeScript compilation, Biome, generated API documentation, and
all 19 index option tests passed again. Two real Embedded table probes
confirmed that default ZoneMap creation on string and binary columns
leaves the v1 reader and writer capability bits unset; the string range
query used the scalar index and returned the expected rows. A fresh
independent snapshot also passed the string/binary lifecycle probes on
Node 22 and 24 (24 manifest observations), the 19 repository index
tests, and the documentation/type/lint checks.

Enterprise checks use mock HTTP endpoints. The native linker reports
C-library minimum-macOS-version warnings, so these runs do not establish
compatibility with older macOS versions.

## Merge Danger

**Door:** two-way

The SDK additions can be reverted. ZoneMap write seeds use v0 by
default. A commit that explicitly sets `lance.zone_write_seeds.version`
to `"1"` activates a persistent reader and writer capability; readers
and writers must support it before opting in. Dropping the index or
restoring an older version does not remove that capability from
subsequent snapshots.

**Blast Radius:** TypeScript

Adds index configuration factories and NAPI bindings; reuses existing
core index creation and Enterprise serialization.
2026-11-30 20:23:00 +08:00
Nikolai Vysotskyi 8a27234be2 feat(python): add AssetFeed reranker (#5258)
Adds `AssetFeedReranker`, which calls the AssetFeed Cohere-style
`/rerank` endpoint (`assetfeed/assetfeed-rerank-v1`). It follows
`JinaReranker` (plain `requests`, no new dependency) and supports
vector, FTS and hybrid search with the same `return_score` options as
the Cohere reranker.

- Key from `api_key` or `ASSETFEED_API_KEY`.
- The API accepts up to 100 documents per request. More raises a clear
error before any request.
- `top_n` is only sent when set.

Python and docs only (`integrations/reranking/assetfeed`).

### Testing

- `test_assetfeed_reranker.py`: 12 tests with a mocked session, no
network.
- `test_rerankers.py`, `test_reranker_credentials.py`: pass. `ruff
check` passes.
- Not tested live: no API key was used.
2026-11-30 20:22:28 +08:00
Nikolai Vysotskyi 41637c646e feat(python): add AssetFeed embedding provider (#5257)
Adds an `assetfeed` text embedding provider for the AssetFeed embeddings
API (`assetfeed/assetfeed-embed-v1`). It uses the existing optional
`openai` client with AssetFeed's OpenAI-compatible endpoint, as the
`nvidia` provider does.

- Documents are embedded with `input_type="document"`, searches with
`input_type="query"`.
- `dim` is 1024 (default), 512 or 256. Batches are at most 64 inputs.
- The key comes from `ASSETFEED_API_KEY` or an `api_key` registry
variable reference.
- Response count, indices, dimensions and values are checked. Null and
empty text get a null vector without a request.
- Each request is retried on its own with LanceDB's retry policy.

Python and docs only (`integrations/embedding/assetfeed`). No dependency
changes.

### Testing

- `test_assetfeed_embeddings.py`: 18 mocked-HTTP tests through the real
OpenAI client, no network. They cover request shape, batching, response
order, null inputs, a local table, retries and invalid responses.
- Registry and trust suites: pass. `ruff check` passes.
- Not tested live: no API key was used.

---
2026-11-30 20:18:29 +08:00
lipeh1andlipeih 84e0f53836 feat(python): register live LanceDB tables with DataFusion (#5203)
Python DataFusion queries over a provider registered from
`table.to_lance()` read a fixed Lance snapshot. An append from another
connection doesn't show up in later queries unless the application
registers a new provider.

Register a LanceDB Embedded `Table` or `AsyncTable` directly with
DataFusion 55.x using `ctx.register_table("items", table)`. The provider
shares the LanceDB table handle, so each new scan follows its read
consistency interval and checked-out version. The provider supports SQL
reads. Re-register after a schema change.

The binding checks the DataFusion FFI major before reading the
consumer's capsule and keeps scan planning and execution on the LanceDB
Tokio runtime. DataFusion remains an optional Python dependency.

Closes #2707.

Validation on Windows x64 with CPython 3.12 and DataFusion 55.0.0:

- Rebuilt the Python extension with the repository's `ci` profile.
- `pytest python/tests/docs/test_guide_tables.py -q`: 6 passed, 2
skipped. The regression covers a second connection writing into a
registered table, both manual and automatic refresh, version pinning,
async table registration, and incompatible DataFusion versions.
- A separate smoke test confirmed refresh with a positive read
consistency interval.
- Cargo formatting, Python Ruff, and Pyright (Linux target) passed.

Co-authored-by: lipeih <lipeihan@eazytec.com>
2026-11-30 20:18:12 +08:00