Skip to content

fix: ignore exact-form tokens when generating fuzzy suggestions - #160

Merged
Nick-S-2018 merged 2 commits into
mainfrom
fix/fuzzy-exact-form-tokens-5070
Nov 25, 2026
Merged

Nick-S-2018 merged 2 commits into
mainfrom
fix/fuzzy-exact-form-tokens-5070

Conversation

@sanikolaev

Copy link
Copy Markdown
Collaborator

Summary

  • Skip =word exact-form tokens returned by CALL KEYWORDS when building fuzzy variations. These tokens belong to an existing query position and must not become an additional required SQL MATCH term.
  • Add unit regression cases for a single misspelled word and a two-word query with lemmatize_en_all-style tokens, plus a control case without exact-form tokens.
  • Verify CALL SUGGEST is never called for =word.

Why

With morphology='lemmatize_en_all', CALL KEYWORDS('keybord', ...) returns both keybord and =keybord. Fuzzy search previously treated them as separate words, producing an AND condition that prevented SQL queries from finding keyboard.

Related: manticoresoftware/manticoresearch#5070.

Skip =word entries from CALL KEYWORDS so a single query word does not become multiple required fuzzy terms. Add unit regression coverage for single-word, multi-word, and ordinary morphology cases.

Related: manticoresoftware/manticoresearch#5070
@Nick-S-2018
Nick-S-2018 force-pushed the fix/fuzzy-exact-form-tokens-5070 branch from 310e2b8 to b3da8f7 Compare November 25, 2026 13:20
@Nick-S-2018
Nick-S-2018 merged commit 6cc314d into main Nov 25, 2026
5 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.

2 participants