Repository navigation
[MOD-14883] query_eval: add QN_FUZZY evaluation tests - #10869
Merged
Merged
Conversation
1 of 4 tasks
gdesmott
force-pushed
the
gd_qast_fuzzy_tests
branch
3 times, most recently
from
August 11, 2026 13:43
97e4cd0 to
8039cc3
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10869 +/- ##
==========================================
- Coverage 83.08% 82.15% -0.93%
==========================================
Files 608 632 +24
Lines 80936 82051 +1115
Branches 36114 37229 +1115
==========================================
+ Hits 67247 67412 +165
- Misses 13346 14296 +950
Partials 343 343
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Move `term_records` and `ALL_INDEXED_FIELDS` out of the prefix tests and into the integration tests' `util` module, so upcoming fixtures can use them instead of carrying byte-identical copies.
Add `query_eval` integration tests covering the fuzzy node evaluator ahead of porting it to Rust: expansion within a Levenshtein distance ladder, the maxDist bound, lowercasing, the single-match collapse and its unit child weight, the node weight a multi-child union carries, the quick-exit union taking only the first child holding a document, terms without an inverted index, the field-mask narrowing, the expansion cap with both its warning and a negative control, the trie pattern-length bound, and the apiVersion-gated empty-term expansion. Add `MockQueryNode::set_fuzzy_max_dist` so a mock fuzzy node can carry a distance; a zero-initialised node would only ever match the token itself. codespell skips the fuzzy test file, as the trie, wildcard and multibyte-term tests already are. The tests index terms a single edit away from the query token, so `abc` is searched for while `abd` is indexed — which codespell reads as a misspelling of "and" or "bad". A file about edit distance will keep producing words that look like typos, because that is what it is testing.
gdesmott
force-pushed
the
gd_qast_fuzzy_tests
branch
from
August 12, 2026 07:49
8039cc3 to
05534d1
Compare
|
LukeMathWalker
approved these changes
Aug 12, 2026
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.



Describe the changes in the pull request
Current:
QN_FUZZYis still evaluated by the C dispatcher, and thequery_evalintegration suite has no coverage for it. Porting the evaluatorto Rust without that coverage would leave nothing to check the port against.
Change: Add
query_evalintegration tests for the fuzzy node evaluator,written and passing against the current C implementation, so they can be
reviewed independently of any port and then act as the invariant for it.
They cover: expansion within a Levenshtein distance ladder, the
maxDistbound, lowercasing, the single-match collapse and its unit child weight, the
node weight a multi-child union carries, the quick-exit union taking only the
first child holding a document, terms without an inverted index, the field-mask
narrowing, the expansion cap with both its warning and a negative control, the
trie pattern-length bound, and the apiVersion-gated empty-term expansion.
Supporting changes:
MockQueryNode::set_fuzzy_max_dist, so a mock fuzzy node can carry adistance — a zero-initialised node would only ever match the token itself.
term_recordsandALL_INDEXED_FIELDSout ofthe prefix tests and into the integration tests'
utilmodule, so the fuzzyand prefix fixtures share them instead of carrying byte-identical copies.
multibyte-term tests already have. The tests index terms a single edit away
from the query token —
abcis searched for whileabdis indexed — whichcodespell reads as a misspelling. A file about edit distance keeps producing
words that look like typos, because that is what it is testing.
Outcome: No production code changes and no user-visible change; test-only.
The suite becomes the safety net for the follow-up port of
Query_EvalFuzzyNodeto Rust ([MOD-14883] query_eval: evaluate QN_FUZZY in Rust #10860, stacked on this PR).Which additional issues this PR fixes
Main objects this PR modified
src/redisearch_rs/query_eval/tests/integration/fuzzy.rs— the new suitesrc/redisearch_rs/query_eval/tests/integration/util.rs— shared fixturessrc/redisearch_rs/query_eval/tests/integration/prefix.rs— use the shared fixturessrc/redisearch_rs/c_wrappers/query/src/mock/query_node_ref.rs—set_fuzzy_max_dist.codespell/.codespellrc— skip the fuzzy test fileMark if applicable
Release Notes
Test-only change, no user-visible behaviour change.