Skip to content

Add long unicode61 token search fallback - #5081

Merged
Widthdom merged 3 commits into
mainfrom
fix-issue5080
Aug 15, 2026
Merged

Add long unicode61 token search fallback#5081
Widthdom merged 3 commits into
mainfrom
fix-issue5080

Conversation

@Widthdom

Copy link
Copy Markdown
Owner

Summary

  • Recover eligible ASCII substrings inside reported unicode61 tokens longer than 1,000 runes when ordinary FTS returns no results.
  • Bound the fallback to current fts_token_too_long evidence and a synchronized trigram index, then revalidate token membership before returning results.
  • Preserve cursor pagination, deduplication, count alignment, normal-token behavior, and post-processing guards.
  • Update diagnostics, regression coverage, bilingual user/testing documentation, and the changelog fragment.

Root cause

SQLite FTS5's unicode61 tokenizer does not index tokens longer than 1,000 characters. CodeIndex already detected and reported those tokens, but search had no bounded alternate candidate path for literals contained only inside an overlong token.

Validation

  • dotnet build CodeIndex.sln -c Release --no-restore
  • Targeted DbSearchReaderIssueTests and related diagnostics on net8.0: 27 passed
  • Targeted DbSearchReaderIssueTests and related diagnostics on net9.0: 25 passed, 2 skipped as expected
  • dotnet run --project tools/CodeIndex.Changelog --no-restore -- check
  • Two Codex adversarial-review rounds; all five actionable findings were fixed and covered by regression tests
  • Full Release solution tests were also attempted twice. The longer run timed out after 25 minutes without a reported test failure or blame hang diagnostic.

Documentation and changelog

  • Updated the English and Japanese sections of USER_GUIDE.md and TESTING_GUIDE.md.
  • Added changelog.d/unreleased/5080.fixed.md.

Fixes #5080

@Widthdom
Widthdom marked this pull request as ready for review August 15, 2026 09:01
@Widthdom
Widthdom merged commit 8d53712 into main Aug 15, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue5080 branch August 15, 2026 09:02
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.

Add searchable fallback for unicode61 tokens longer than 1000 characters

1 participant