fts: fix stopword maintenance and transactional statistics - #42
Open
jkumz wants to merge 3 commits into
Open
Conversation
- Filter configured stopwords during conjunctive no-stemmer maintenance paths - Preserve the zero-work fast path for non-conjunctive no-stemmer queries - Cover create, insert, mixed lifecycle, custom stopword, and reload regressions
- Continue indexing after stopword-only documents and count only indexed documents in FTS statistics - Resolve indexed property vectors by logical batch position during term reconstruction - Cover COPY and UNWIND stopword regressions with score stability after deletion
- Accumulate document counts, lengths, and checkpoint watermarks per transaction - Apply metadata on commit and discard it safely on rollback - Preserve read-your-own-writes scoring and repeated batch finalization - Cover multi-insert and mixed delete/insert rollback regressions
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 fixes three FTS consistency bugs:
Changes
Apply consistent stopword filtering
Apply configured stopword filtering to conjunctive index-maintenance paths when
stemmer := 'none'.This keeps initial index construction, runtime insertion, and deletion consistent while preserving the existing no-stemming behavior for non-conjunctive query paths.
Preserve batch processing
Skip documents that produce no indexed terms without terminating the remaining batch.
The insertion and deletion paths now:
Make FTS statistics transactional
Accumulate document-count, total-document-length, and checkpoint-watermark changes per transaction.
Testing
lbug_fts_extension.clang-format --dry-run --Werror.git diff --check.Fixes #39 #40 #41