Skip to content

test(fts): compare two indexes instead of pinning a BM25 score - #126

Open
zahariash wants to merge 1 commit into
LadybugDB:mainfrom
zahariash:test/fts-copy-score-free
Open

zahariash wants to merge 1 commit into
LadybugDB:mainfrom
zahariash:test/fts-copy-score-free

Conversation

@zahariash

Copy link
Copy Markdown

This work was produced with the help of language models.

Follow-up to #123. Its phantom-document case in copy_ignore_errors.test pinned the BM25 score 0.353634; @adsharma noted in review that an exact score match is brittle and would need updating with every scoring or data change.

The case now builds one FTS index before COPY ... (ignore_errors=true), which is maintained through it and would pick up the phantom document, and a second one after it, which cannot, and checks that both score the surviving document the same. No score value is pinned. Without the #123 fix the case fails with 2|False. Test-only change.

The phantom-document case in copy_ignore_errors.test pinned the BM25
score 0.353634, which would change with any scoring or data change. It
now checks that the table holds the three surviving rows, builds a
second index after the COPY and checks that both indexes score the
document the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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