Skip to content

fix(fts): score explicit empty segment scopes without indexed statistics - #11063

Merged
BubbleCal merged 5 commits into
mainfrom
fix/flat-fts-empty-segments-20261114
Nov 14, 2026
Merged

BubbleCal merged 5 commits into
mainfrom
fix/flat-fts-empty-segments-20261114

Conversation

@BubbleCal

@BubbleCal BubbleCal commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

An explicit empty segment selection currently fails in FlatMatchQueryExec. A distributed residual-only worker needs to retain the snapshot's tokenizer while scoring only its input corpus, without opening unassigned index segments.

Load the complete persisted tokenizer parameters through the existing metadata-only load_segment_params helper for an explicit empty selection, while adding no indexed document or term statistics. This preserves custom stop lists and JSON document tokenization omitted by the manifest's lossy InvertedIndexDetails. Implicit full-index selection is unchanged. This supports Sophon #10314 through normal published-release adoption.

Validation:

  • Parent regression: test-only 29b88f8 on main 8e97763 reproduces requires at least one segment for both indexed-corpus sizes; 10,604 other tests passed.
  • Tests cover independent input-only BM25 scores, two indexed-corpus sizes, configured/default case handling, custom replacement stop lists, JSON field-qualified matching, and replay. Complete-tokenizer cases retain metadata while deleting the index partition files and verify unchanged index-cache entries after binding the manifest listing.
  • Exact head 3e09054: Rust x64, Rust ARM and Clippy passed. Gatekeeper recommends approve on this head. Formal review requested from LuQQiu.
  • Earlier cache-count failures at cbccb7f counted manifest metadata as partition access; the current fixture isolates that baseline and makes partition files physically unavailable. Matching and score assertions are retained.
  • Local formatting and whitespace checks passed. Correctness builds and execution run in CI under the task policy; no local correctness build was run.

No performance claim, persisted-format change, dependency change or index rebuild.

@github-actions github-actions Bot added the bug Something isn't working label Nov 13, 2026
@BubbleCal
BubbleCal marked this pull request as ready for review November 13, 2026 20:41

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-changes Latest Gatekeeper recommendation requests changes. label Nov 13, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-changes Latest Gatekeeper recommendation requests changes. label Nov 13, 2026
lance-gatekeeper[bot]

This comment was marked as outdated.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 13, 2026
@lance-gatekeeper lance-gatekeeper Bot removed the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 13, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Gate recommendation: approve.

Explicit empty scopes retain the complete persisted tokenizer configuration without importing indexed statistics. The production fix is unchanged; the revised regression fixture removes partition files and loads manifest metadata before measuring the index cache, strengthening the metadata-only access check.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 13, 2026
@BubbleCal
BubbleCal requested a review from LuQQiu November 13, 2026 21:50
@lance-gatekeeper lance-gatekeeper Bot added K-approved Latest Gatekeeper recommendation permits acceptance. and removed K-approved Latest Gatekeeper recommendation permits acceptance. labels Nov 13, 2026
@BubbleCal
BubbleCal merged commit aa23383 into main Nov 14, 2026
48 of 49 checks passed
@BubbleCal
BubbleCal deleted the fix/flat-fts-empty-segments-20261114 branch November 14, 2026 06:46
BubbleCal added a commit to lancedb/lancedb that referenced this pull request Nov 14, 2026
Upgrade the Rust Lance family from beta.18 to the published
v15.0.0-beta.21 tag, and align Python test wheels and Java artifacts.
This includes the explicit-empty-segment FTS fix in
lance-format/lance#11063 needed by lancedb/sophon#10314. Enable Windows
Git long paths so Cargo can check out Lance fixtures in the Rust, NPM
and Python wheel builds.

Beta.21 also contains lance-format/lance#9858: new NGram, RTree and
MinHash LSH indexes use row addresses. Legacy row-ID segments remain
readable, but index maintenance on stable-row-ID tables can require a
rebuild. The NGram documentation now explains the consolidation
requirement; NGram/RTree tables without stable row IDs retain their
earlier format. The Python lock revision and unrelated dependency
entries are unchanged.

Validation:
- The official Lance release and internal mirror match
80bc45a195279befdec42853dac8d15a37e0504d. The seven official Fury wheels
and Maven POM/JAR were verified.
- Exact executable/dependency state 7846a15 completed the full Rust,
Python, Node, Java and CLI CI, including platform builds and package
publication dry runs. Xuanwo approved that head; Gatekeeper recommended
approve with a non-blocking qualification risk.
- Follow-up a289cb2 only adds the requested seven-line NGram upgrade
note. Static whitespace checks passed; new-head CI is running. No local
correctness tests or test builds were run by this task owner.
- Broader IVF/encoding/Blob/cache workload performance and the beta.21
Sophon composition remain separately qualified. Earlier Blob
cancellation and DynamoDB failures on #4967 are retained in their
original evidence; this PR does not count those historical failures as
fixed.

Current-head CI, full feedback and required review still gate merge. SDK
publication is a separate action. Sophon adoption follows a published
SDK release and mirror through its own dependency PR; its distributed
performance acceptance remains in #10314.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants