feat(fts)!: make v2 the default index format#7512
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Contributor
Author
|
@claude review |
Xuanwo
reviewed
Jun 29, 2026
Xuanwo
left a comment
Collaborator
There was a problem hiding this comment.
The mem-wal maintained-index path should have end-to-end v1 coverage before this lands. The key compatibility contract is that an existing v1 FTS index remains v1 after maintenance; if this path accidentally flushes the maintained index as v2, FTS queries may still pass while older readers lose compatibility.
Xuanwo
approved these changes
Jun 30, 2026
Xuanwo
left a comment
Collaborator
There was a problem hiding this comment.
Thank you for working on this. We will need a breaking change upgrade note. Can be a follow up PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature
What is the new feature?
This makes FTS v2 the default format for newly-created inverted / full-text indexes and replaces the previous environment-variable switch with an explicit
format_versionindex creation parameter.Why do we need this feature?
FTS v2 is the latest format, but format selection should be part of the index creation API instead of process-wide environment state. Existing v1 indexes must remain queryable and must continue to be maintained as v1 after append, incremental indexing, and optimize.
How does it work?
format_versionhandling in Rust params and exposes it through Python and Java index creation APIs.IndexMetadata.index_versionwhen rebuilding mem-wal FTS config, mapping legacy0and v11to v1 and2to v2.LANCE_FTS_FORMAT_VERSIONwhile new code uses explicitformat_version.Breaking Change
BREAKING CHANGE: Newly-created FTS / inverted indexes now default to v2 instead of v1. Workflows that require the v1 layout, including compatibility with older Lance readers, must pass
format_version=1;LANCE_FTS_FORMAT_VERSIONno longer controls new Lance index creation.Compatibility
Existing v1 FTS indexes remain readable. The regression coverage includes explicit v1 append +
optimize_indices(OptimizeOptions::append())and verifies the resulting FTS index metadata remains v1.Verification
e6a2ca759.git diff --checkpassed locally.cargo,uv, and a Java Runtime are not installed locally; CI covered the PR checks.