perf(index): improve FTS search metadata caching#7398
Open
Xuanwo wants to merge 1 commit into
Open
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
Summary
This PR improves FTS search throughput by avoiding repeated metadata reads on hot search paths:
InvertedIndexmax_score, posting length) in the existing partition-prefixed Lance cacheThe main target is global QPS under concurrent full-text search, especially when the index is stored on object storage.
S3 Performance
Benchmark shape for both datasets:
the,data,learning,world,machine learning,artificial intelligence,中国,人工智能limit=10, projected columns:_rowid,_score1M S3 Dataset
Dataset:
s3://xuanwo-fts-bench-use1/datasets/mmlb_1m_all_columns_no_image_en_zh_icu_bench_icu-1m-perf-opt-20260619T143109Z.lanceThe 32-concurrency point is saturated/noisy; the improvement is stable at 1-16 concurrency.
10M S3 Dataset
Dataset:
s3://xuanwo-fts-bench-use1/datasets/mmlb_10m_full_content_icu_s3_search_20260623T000000Z.lanceThe 10M S3 result confirms the object-store improvement at larger index scale. The 32-concurrency point remains saturated/noisy and has a p95 regression despite higher QPS.
Validation
cargo fmt --allgit diff --checkcargo test -p lance-index scalar::inverted::index::tests::cargo clippy --all --tests --benches -- -D warnings