Skip to content

Correct bounded ngram query sampling - #55

Merged
dblock merged 1 commit into
mongoid:masterfrom
dblock:dblock/ngram-sampling
Oct 17, 2026
Merged

dblock merged 1 commit into
mongoid:masterfrom
dblock:dblock/ngram-sampling

Conversation

@dblock

@dblock dblock commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Replace the stride calculation with an exact bounded sample across the query, including both endpoints when taking multiple samples. The example in #18 now produces abc, efg, ijk. Cover every length 0–26 and bound 1–12, one-sample behavior, unbounded indexing, and independent full-word/prefix bonuses. Reject invalid limits at declaration time. Document possible ranking changes and that no reindex is required.

Fixes #18. Depends on #51.

Prepared by an AI on behalf of @dblock.

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Danger Report

No issues found.

View run

@dblock
dblock force-pushed the dblock/ngram-sampling branch from 0a8df79 to 60e097e Compare October 17, 2026 03:35
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dblock
dblock force-pushed the dblock/ngram-sampling branch from 60e097e to 07a6ee1 Compare October 17, 2026 03:37
@dblock
dblock merged commit 2360c51 into mongoid:master Oct 17, 2026
12 checks passed
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.

Incorrect step size when string is longer than the number of n-grams desired

1 participant