Skip to content

tantivy 0.22 → 0.26 with graceful FTS reset (lru advisory path) - #253

Merged
flupkede merged 1 commit into
developfrom
chore/upgrade-tantivy-026
Sep 15, 2026
Merged

flupkede merged 1 commit into
developfrom
chore/upgrade-tantivy-026

Conversation

@flupkede

Copy link
Copy Markdown
Owner

Fase D2 of the dependency roadmap.

Code changes (small)

  • TopDocs::with_limit(n).order_by_score() at the three search call sites (collector API change in 0.26)

Behavior: unreadable FTS index resets instead of bricking the DB

tantivy cannot open index files written by an older major. Pre-upgrade DBs would have failed FtsStore::new on every path (search, serve, doctor). The FTS index is derived data, so an unreadable index is now wiped and recreated empty with a warning pointing at codesearch index; BM25 rebuilds on the next (re)index. Vector search and all non-FTS paths unaffected. Pinned by a regression test (corrupt meta.json → store opens, searches empty, accepts writes).

Advisory impact

lru 0.12.5 (via tantivy) is gone — tantivy 0.26 uses lru 0.16.4. The lru 0.12.5 residue still via ratatui 0.29 clears with the ratatui 0.30 bump (follow-up).

Validation

fmt, clippy -D warnings, cargo test --lib --bins: 1386 passed / 0 failed.

- TopDocs::with_limit now needs .order_by_score() (collector API change),
  applied at the three search call sites
- tantivy cannot open index files written by an older major; an unreadable
  FTS index is now wiped + recreated instead of failing the DB open.
  FTS is derived data: BM25 rebuilds on next (re)index, vector search
  unaffected. Warning logged. Regression test: corrupt meta.json.
- merged origin/develop (fastembed 6 CHANGELOG repair + entries)

Validation: fmt, clippy -D warnings, cargo test --lib --bins green.
@flupkede
flupkede merged commit 4133ad6 into develop Sep 15, 2026
7 checks passed
@flupkede
flupkede deleted the chore/upgrade-tantivy-026 branch September 15, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant