Skip to content

[MOD-14883] query_eval: evaluate QN_FUZZY in Rust - #10860

Merged
gdesmott merged 4 commits into
masterfrom
gd_qast_fuzzy_query
Aug 17, 2026
Merged

gdesmott merged 4 commits into
masterfrom
gd_qast_fuzzy_query

Conversation

@gdesmott

@gdesmott gdesmott commented Aug 11, 2026 •

Copy link
Copy Markdown
Collaborator

Describe the changes in the pull request

  1. Current: QN_FUZZY is one of the last node types still evaluated by the C
    dispatcher. src/query.c routes it to Query_EvalFuzzyNode, which calls the
    C-only helpers iterateExpandedTerms and addTerm — the last surviving callers
    of both, since QN_PREFIX was ported and now expands through
    query_eval::expansion::Expansion. The expansion logic therefore exists twice,
    in C and in Rust, and can drift.

  2. Change: Port Query_EvalFuzzyNode to Rust, following the pattern the
    already-ported node types use.

    • New query_eval/src/nodes/fuzzy.rs, reusing the shared Expansion
      accumulator rather than adding a second expansion path.
    • New CTrieRef::iterate_fuzzy in c_trie, keeping the Trie_IterateFuzzy /
      TrieIterator_Next / TrieIterator_Free pull loop and the DFAFilter it owns
      inside the wrapper, and handing each match to a
      FnMut(&[rune], usize) -> ControlFlow<()> — the shape the existing
      iterate_contains / iterate_suffix walks already use.
    • A #[must_use] FuzzyWalk { Walked, PatternRejected } so "the trie declined the
      pattern" (yield no iterator) stays distinguishable from "the walk matched
      nothing" (yield an empty union). Prefix expansion never has to make that
      distinction; fuzzy does.
    • Expansion::push_child_ignoring_cap, because the empty-term expansion must be
      appended even when the expansion cap is full, and without falsely recording the
      reached-max warning.
    • iterateExpandedTerms, addTerm and Query_EvalFuzzyNode deleted from
      src/query.c; QN_FUZZY moved into the Rust-dispatched arm.

    The deliberate departures from the C, and why each was taken, are spelled out
    in the port commit's message.

  3. Outcome: No user-visible change. %word% / %%word%% queries keep the same
    expansion set, document order, union semantics, reached max prefix expansions
    warning, the same (absent) error on an over-long pattern, and the same
    FUZZY - <term> profile string. One behaviour changes for an input production
    cannot construct — a negative maxDist, reachable only from the test harness,
    where the empty-term gate is now widened to i64 so the comparison cannot wrap.

This PR is stacked on #10869 and targets its branch.

The invariant is the 22 query_eval integration tests added in #10869.
They were written and reviewed before the port, pass against the C
implementation, and pass unchanged against the Rust one. The existing end-to-end
test_fuzzy suite also passes against the port.

Which additional issues this PR fixes

  1. MOD-14883

Main objects this PR modified

  1. src/query.c — Query_EvalFuzzyNode, iterateExpandedTerms, addTerm deleted; QN_FUZZY dispatch moved
  2. src/redisearch_rs/query_eval/src/nodes/fuzzy.rs — the ported evaluator
  3. src/redisearch_rs/query_eval/src/expansion.rs — push_child_ignoring_cap
  4. src/redisearch_rs/c_wrappers/c_trie/src/lib.rs — CTrieRef::iterate_fuzzy, FuzzyWalk
  5. src/redisearch_rs/string_utils/src/libnu.rs — UTF-8 read-ahead helpers, shared instead of duplicated
  6. src/redisearch_rs/ffi/build.rs — bindgen allowlist for the trie iterator symbols

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

Release Notes

  • This PR requires release notes
  • This PR does not require release notes

Internal C-to-Rust port with no user-visible behaviour change.

@codecov

codecov Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.80519% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.12%. Comparing base (63e8ca2) to head (d9d8b03).
⚠️ Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
src/redisearch_rs/query_eval/src/nodes/fuzzy.rs 96.55% 2 Missing ⚠️
src/redisearch_rs/query_eval/src/nodes/token.rs 0.00% 2 Missing ⚠️

❌ Your project check has failed because the head coverage (82.06%) is below the adjusted base coverage (82.12%). You can increase the head coverage or adjust the Removed Code Behavior.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10860      +/-   ##
==========================================
- Coverage   83.16%   82.12%   -1.05%     
==========================================
  Files         611      637      +26     
  Lines       81176    82382    +1206     
  Branches    36388    37645    +1257     
==========================================
+ Hits        67512    67655     +143     
- Misses      13317    14383    +1066     
+ Partials      347      344       -3     
Flag Coverage Δ
flow 84.31% <100.00%> (-0.08%) ⬇️
unit 55.77% <93.50%> (-0.57%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gdesmott
gdesmott force-pushed the gd_qast_wildcard_query branch from 8afa720 to 3f165ce Compare August 11, 2026 11:26
@gdesmott
gdesmott force-pushed the gd_qast_fuzzy_query branch 2 times, most recently from af2f393 to 071c377 Compare August 11, 2026 11:32
@gdesmott
gdesmott force-pushed the gd_qast_wildcard_query branch from 3f165ce to 5b85d0e Compare August 11, 2026 11:32
Base automatically changed from gd_qast_wildcard_query to master August 11, 2026 12:44
@gdesmott
gdesmott force-pushed the gd_qast_fuzzy_query branch from 071c377 to 0b67676 Compare August 11, 2026 13:09
@gdesmott
gdesmott changed the base branch from master to gd_qast_fuzzy_tests August 11, 2026 13:19
@gdesmott
gdesmott force-pushed the gd_qast_fuzzy_tests branch from c38da12 to 4e6f5e2 Compare August 11, 2026 13:22
@gdesmott
gdesmott force-pushed the gd_qast_fuzzy_query branch from 0b67676 to a532c95 Compare August 11, 2026 13:22
@github-actions github-actions Bot added size:L and removed size:XL labels Aug 11, 2026
@gdesmott
gdesmott force-pushed the gd_qast_fuzzy_query branch from a532c95 to f9fecde Compare August 11, 2026 13:32
@gdesmott
gdesmott force-pushed the gd_qast_fuzzy_tests branch from 4e6f5e2 to 97e4cd0 Compare August 11, 2026 13:32
@gdesmott
gdesmott force-pushed the gd_qast_fuzzy_query branch from f9fecde to cde7733 Compare August 11, 2026 13:43
@gdesmott
gdesmott force-pushed the gd_qast_fuzzy_tests branch from 97e4cd0 to 8039cc3 Compare August 11, 2026 13:43
@gdesmott gdesmott added action:run-benchmark bench:vs-master Use master as baseline when comparing benchmarks labels Aug 11, 2026
@gdesmott
gdesmott force-pushed the gd_qast_fuzzy_query branch from cde7733 to dba8ed7 Compare August 11, 2026 14:29

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dba8ed7a77

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@fcostaoliveira

Copy link
Copy Markdown
Contributor

Automated performance analysis summary

This comment was automatically generated given there is performance data available.

Environment:

  • Triggering env: circleci

Architecture: x86_64 — branch-over-branch

Deployment: oss-standalone

In summary:

  • Detected a total of 5 stable tests between versions.
  • Detected a total of 1 improvements above the improvement water line.
  • Detected a total of 2 regressions bellow the regression water line 8.0%.

You can check a comparison in detail via the grafana link

Performance Improvements - Comparison between master and gd_qast_fuzzy_query.

Time Period from a month ago. (environment used: oss-standalone)

Test Case Baseline master (median obs. +- std.dev) Comparison gd_qast_fuzzy_query (median obs. +- std.dev) % change (higher-better) Note
search-ftsb-1700K-docs-union-iterators-q3 33 +- 0.8% (20 datapoints) 36 8.1% IMPROVEMENT

Performance Regressions and Issues - Comparison between master and gd_qast_fuzzy_query.

Time Period from a month ago. (environment used: oss-standalone)

Test Case Baseline master (median obs. +- std.dev) Comparison gd_qast_fuzzy_query (median obs. +- std.dev) % change (higher-better) Note
search-expire-doc-json-10-milliseconds 32421 +- 5.5% (20 datapoints) 17986 -44.5% REGRESSION
search-filtering-tag-numeric-filter-pipeline 32847 +- 4.1% (20 datapoints) 24768 -24.6% REGRESSION
Tests with No Significant Changes (5 tests)

Tests with No Significant Changes

Test Case Baseline master (median obs. +- std.dev) Comparison gd_qast_fuzzy_query (median obs. +- std.dev) % change (higher-better) Note
hybrid-arxiv-titles-384-angular-rrf-tag-range 3.2 +- 9.5% (20 datapoints) 3.4 5.5% waterline=9.5%. potential IMPROVEMENT
search-filtering-tag-numeric 4324 +- 8.9% (20 datapoints) 4241.0 -1.9% waterline=8.9%. No Change
search-high-cardinality-negation-term-baseline 306 +- 1.4% (20 datapoints) 313.0 2.4% No Change
vecsim-arxiv-titles-384-angular-filters-m16-ef-128-fulltext-filter 8528 +- 4.7% (20 datapoints) 8423.0 -1.2% No Change
vecsim-arxiv-titles-384-angular-filters-m16-ef-128-tag-filter 68047 +- 6.9% (20 datapoints) 71156.0 4.6% potential IMPROVEMENT

Architecture: aarch64 — branch-over-branch

Deployment: oss-standalone

In summary:

  • Detected a total of 3 stable tests between versions.

You can check a comparison in detail via the grafana link

##

Details

Tests with No Significant Changes (3 tests)

Tests with No Significant Changes

Test Case Baseline master (median obs. +- std.dev) Comparison gd_qast_fuzzy_query (median obs. +- std.dev) % change (higher-better) Note
search-expire-doc-json-10-milliseconds 18088 +- 0.9% (20 datapoints) 17986 -0.6% No Change
search-filtering-tag-numeric-filter-pipeline 24584 +- 2.0% (20 datapoints) 24768 0.7% No Change
search-high-cardinality-negation-term-baseline 306 +- 1.4% (20 datapoints) 313 2.4% No Change

Cross-arch delta on gd_qast_fuzzy_query (x86_64 → aarch64)

Same commit (gd_qast_fuzzy_query) compared across architectures. Positive deltas = aarch64 outperforms x86_64.

In summary:

  • Detected a total of 3 stable tests between versions.

You can check a comparison in detail via the grafana link

##

Details

Tests with No Significant Changes (3 tests)

Tests with No Significant Changes

Test Case Baseline gd_qast_fuzzy_query (median obs. +- std.dev) Comparison gd_qast_fuzzy_query (median obs. +- std.dev) % change (higher-better) Note
search-expire-doc-json-10-milliseconds 17986 17986 0.0%
search-filtering-tag-numeric-filter-pipeline 24768 24768 0.0%
search-high-cardinality-negation-term-baseline 313 313 0.0%

@fcostaoliveira

fcostaoliveira commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Automated performance analysis summary

This comment was automatically generated given there is performance data available.

Environment:

  • Triggering env: circleci

Architecture: x86_64 — branch-over-branch

Deployment: oss-standalone

In summary:

  • Detected a total of 25 stable tests between versions.
  • Detected a total of 16 highly unstable benchmarks (16 baseline).
  • Latency analysis confirmed regressions in 1 of the unstable tests:
  • Detected a total of 20 improvements above the improvement water line.
  • Detected a total of 7 regressions bellow the regression water line 8.0%.

You can check a comparison in detail via the grafana link

Performance Improvements - Comparison between master and gd_qast_fuzzy_query.

Time Period from a month ago. (environment used: oss-standalone)

Test Case Baseline master (median obs. +- std.dev) Comparison gd_qast_fuzzy_query (median obs. +- std.dev) % change (higher-better) Note
search-aggregate-post-filter-simple.yml 60363 +- 9.8% (20 datapoints) 105561.0 74.9% waterline=9.8%. IMPROVEMENT
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-explicit-k50 44 +- 6.2% (20 datapoints) 72.0 63.7% IMPROVEMENT
ftsb-1M-enwiki_abstract-hashes-fulltext-2word-union-query-non-sortable 1293 +- 6.4% (20 datapoints) 2115.0 63.6% IMPROVEMENT
search-groupby-collect-10K-entity-events-json-cached-sortby-fields-star-offset500-k50 27 +- 5.3% (20 datapoints) 42.0 57.5% IMPROVEMENT
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-tags-k50 53 +- 7.7% (20 datapoints) 82.0 56.4% IMPROVEMENT
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-star-offset500-k50 37 +- 4.4% (20 datapoints) 55.0 48.0% IMPROVEMENT
ftsb-1M-enwiki_abstract-hashes-fulltext-2word-intersection-query 5568 +- 5.5% (20 datapoints) 7841.0 40.8% IMPROVEMENT
ftsb-1M-enwiki_abstract-hashes-load 24626 +- 5.4% (20 datapoints) 33494.0 36.0% IMPROVEMENT
ftsb-10K-enwiki_abstract-hashes-term-prefix 25786 +- 3.2% (20 datapoints) 34782.0 34.9% IMPROVEMENT
search-expire-numeric-field-10-milliseconds 14 +- 2.9% (20 datapoints) 19.0 33.0% IMPROVEMENT
search-expire-numeric-field-1000-seconds 14 +- 2.7% (20 datapoints) 18.0 30.8% IMPROVEMENT
search-ftsb-1700K-docs-union-iterators-q3 33 +- 0.7% (20 datapoints) 41.0 24.9% IMPROVEMENT
ftsb-10K-enwiki_pages-hashes-fulltext-mixed_simple-1word-query_write_1_to_read_20.yml 1952 +- 3.2% (20 datapoints) 2430.0 24.5% IMPROVEMENT
ftsb-1M-enwiki_abstract-hashes-fulltext-2word-union-query 26650 +- 3.2% (20 datapoints) 32522.0 22.0% IMPROVEMENT
search-numeric-sortby-optimize 446 +- 6.5% (20 datapoints) 538.0 20.5% IMPROVEMENT
vecsim-arxiv-titles-384-angular-filters-m16-ef-128-tag-filter 71433 +- 5.2% (20 datapoints) 78641.0 10.1% IMPROVEMENT
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-tags-duedate-k50 46 +- 6.0% (20 datapoints) 50.0 9.4% IMPROVEMENT
ftsb-10K-enwiki_abstract-hashes-term-suffix-withsuffixtrie 74148 +- 4.1% (20 datapoints) 80235.0 8.2% IMPROVEMENT
search-ftsb-5200K-docs-union-iterators-q1 3.9 +- 6.9% (20 datapoints) 4.2 8.2% IMPROVEMENT
search-ftsb-5500K-docs-union-iterators-q2 6.0 +- 7.8% (20 datapoints) 6.5 8.0% IMPROVEMENT

Performance Regressions and Issues - Comparison between master and gd_qast_fuzzy_query.

Time Period from a month ago. (environment used: oss-standalone)

Test Case Baseline master (median obs. +- std.dev) Comparison gd_qast_fuzzy_query (median obs. +- std.dev) % change (higher-better) Note
search-expire-doc-json-10-milliseconds 33108 +- 4.8% (20 datapoints) 18218.0 -45.0% REGRESSION
ftsb-10K-multivalue-numeric-json 8312 +- 5.8% (20 datapoints) 5213.0 -37.3% REGRESSION
search-ftsb-arxiv-titles-384-angular-filters-m16-ef-128-json-load 5928 +- 9.5% (20 datapoints) 3728.0 -37.1% waterline=9.5%. REGRESSION
search-numeric-optimize 21024 +- 5.7% (20 datapoints) 14795.0 -29.6% REGRESSION
ftsb-10K-enwiki_pages-hashes-load 81446 +- 12.5% UNSTABLE (20 datapoints) 58089.0 -28.7% UNSTABLE (baseline high variance); server: hset p50 decreased 20.1% (baseline CV=5.9%); client: client latency stable; neither server nor client side confirms regression
ftsb-10K-enwiki_abstract-hashes-term-wildcard 51722 +- 5.2% (20 datapoints) 38185.0 -26.2% REGRESSION
search-numeric-sortby 26581 +- 16.6% UNSTABLE (20 datapoints) 20794.0 -21.8% UNSTABLE (baseline high variance); server: p50 latency stable; client: client latency stable; neither server nor client side confirms regression
ftsb-1K-enwiki_abstract-hashes-term-contains 25664 +- 6.9% (20 datapoints) 20406.0 -20.5% REGRESSION
search-dropindex-keepdocs-gil-writer-contention 11231 +- 23.8% UNSTABLE (20 datapoints) 10190.0 -9.3% UNSTABLE (baseline high variance); server: p50 latency stable; client: OverallQuantiles.allCommands.q50 decreased 30.7% (baseline CV=24.7%); neither server nor client side confirms regression
hybrid-arxiv-titles-384-angular-linear-numeric-vector 1339 +- 5.8% (20 datapoints) 1229.0 -8.2% REGRESSION
hybrid-arxiv-titles-384-angular-linear-text-range 3.0 +- 10.1% UNSTABLE (20 datapoints) 2.8 -7.3% UNSTABLE (baseline high variance); server: p50 latency stable; client: Latency increased 7.3% (baseline CV=10.4%); neither server nor client side confirms regression
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-tags-duedate-distinct-k50 67 +- 11.2% UNSTABLE (20 datapoints) 66.0 -2.3% UNSTABLE (baseline high variance); server: FT.AGGREGATE p50 increased 69.4% (baseline CV=15.4%); client: client latency stable; only server side confirms regression (client side stable) - insufficient evidence
search-expire-doc-1000-seconds 19 +- 10.2% UNSTABLE (20 datapoints) 19.0 0.2% UNSTABLE (baseline high variance); server: p50 latency stable; client: Latency decreased 19.5% (baseline CV=2.4%); neither server nor client side confirms regression
search-numeric-sortby-desc 20970 +- 17.2% UNSTABLE (20 datapoints) 21917.0 4.5% UNSTABLE (baseline high variance); server: FT.SEARCH p50 decreased 10.1% (baseline CV=12.0%); client: Latency increased 46.0% (baseline CV=0.0%); only client side confirms regression (server side stable) - insufficient evidence
search-numeric 23285 +- 19.9% UNSTABLE (20 datapoints) 24848.0 6.7% UNSTABLE (baseline high variance); server: p50 latency stable; client: Latency increased 53.1% (baseline CV=17.8%); only client side confirms regression (server side stable) - insufficient evidence
search-ftsb-1M-enwiki_abstract-hashes-fulltext-simple-1word-query-one-indexed-field 22851 +- 12.9% UNSTABLE (20 datapoints) 24577.0 7.6% UNSTABLE (baseline high variance); server: p50 latency stable; client: Latency decreased 8.6% (baseline CV=10.9%); neither server nor client side confirms regression
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-tags-distinct-k50 79 +- 13.2% UNSTABLE (20 datapoints) 87.0 11.4% UNSTABLE (baseline high variance); server: FT.AGGREGATE p50 decreased 15.2% (baseline CV=18.8%); client: OverallQuantiles.allCommands.q50 decreased 34.6% (baseline CV=7.7%); neither server nor client side confirms regression
search-ftsb-1M-enwiki_abstract-hashes-fulltext-simple-1word-query-non-sortable 176 +- 14.4% UNSTABLE (20 datapoints) 201.0 14.6% UNSTABLE (baseline high variance); server: FT.SEARCH p50 decreased 14.5% (baseline CV=14.3%); client: OverallQuantiles.allCommands.q50 decreased 14.6% (baseline CV=14.4%); neither server nor client side confirms regression
search-high-cardinality-negation-term-comparison_union_all_other_terms 131 +- 36.5% UNSTABLE (20 datapoints) 151.0 15.3% UNSTABLE (baseline high variance); server: p50 latency stable; client: Latency decreased 13.4% (baseline CV=25.2%); neither server nor client side confirms regression
search-filtering-tag-numeric 4327 +- 11.3% UNSTABLE (20 datapoints) 5514.0 27.4% UNSTABLE (baseline high variance); server: FT.AGGREGATE p50 increased 21.8% (baseline CV=26.8%); client: Latency decreased 21.2% (baseline CV=11.0%); only server side confirms regression (client side stable) - insufficient evidence
search-ftsb-1M-enwiki_abstract-hashes-gc 138 +- 10.0% UNSTABLE (20 datapoints) 203.0 47.8% UNSTABLE (baseline high variance); server: hset p50 increased 33.6% (baseline CV=10.9%); client: Latency increased 5267181.7% (baseline CV=17.0%); confidence=HIGH (hset baseline CV=9.1%; hset p99 -32.5% (stable baseline); CV=coefficient of variation (data stability: <30% stable, 30-50% moderate, >50% unstable))
ftsb-1M-enwiki_abstract-hashes-fulltext-2word-intersection-query-non-sortable 39 +- 22.4% UNSTABLE (20 datapoints) 77.0 98.1% UNSTABLE (baseline high variance); server: FT.SEARCH p50 decreased 16.4% (baseline CV=10.2%); client: OverallQuantiles.allCommands.q50 decreased 11.1% (baseline CV=1.9%); neither server nor client side confirms regression
search-groupby-collect-10K-entity-events-json-cached-sortby-fields-explicit-k50 0.09 +- 29.0% UNSTABLE (20 datapoints) 9.0 9656.7% UNSTABLE (baseline high variance); server: FT.AGGREGATE p50 decreased 23.4% (baseline CV=0.0%); client: client latency stable; neither server nor client side confirms regression
Tests with No Significant Changes (25 tests)

Tests with No Significant Changes

Test Case Baseline master (median obs. +- std.dev) Comparison gd_qast_fuzzy_query (median obs. +- std.dev) % change (higher-better) Note
ftsb-10K-enwiki_abstract-hashes-fulltext-sortby 1127 +- 3.5% (20 datapoints) 1124.0 -0.3% No Change
ftsb-10K-enwiki_abstract-hashes-term-suffix 33932 +- 4.7% (20 datapoints) 35369.0 4.2% potential IMPROVEMENT
ftsb-10K-singlevalue-numeric-json 4128 +- 6.8% (20 datapoints) 4368.0 5.8% potential IMPROVEMENT
ftsb-1M-enwiki_abstract-hashes-fulltext-simple-1word-query 13435 +- 5.1% (20 datapoints) 14251.0 6.1% potential IMPROVEMENT
ftsb-1M-nyc_taxis-ftadd-load 36788 +- 5.7% (20 datapoints) 38393.0 4.4% potential IMPROVEMENT
ftsb-1M-nyc_taxis-hashes-load 29690 +- 2.6% (20 datapoints) 29638.0 -0.2% No Change
hybrid-arxiv-titles-384-angular-rrf-tag-range 3.1 +- 9.2% (20 datapoints) 2.9 -8.0% waterline=9.2%. potential REGRESSION
hybrid-arxiv-titles-384-angular-rrf-text-vector 1494 +- 6.2% (20 datapoints) 1389.0 -7.0% potential REGRESSION
search-expire-doc-10-milliseconds 18 +- 8.9% (20 datapoints) 18.0 0.6% waterline=8.9%. No Change
search-expire-doc-50-50-10-milliseconds 50 +- 0.4% (20 datapoints) 50.0 0.2% No Change
search-expire-doc-multi-index-10-milliseconds 32 +- 0.4% (20 datapoints) 32.0 0.8% No Change
search-expire-write-read-concurrent 98 +- 1.4% (20 datapoints) 101.0 2.5% No Change
search-filtering-tag-numeric-filter-pipeline 33618 +- 4.4% (20 datapoints) 33454.0 -0.5% No Change
search-ftsb-10K-enwiki_abstract-hashes-fulltext-aggregate-sortby-limit-0-100 8572 +- 3.2% (20 datapoints) 8366.0 -2.4% No Change
search-ftsb-10K-enwiki_abstract-hashes-fulltext-search-sortby-limit-0-100 8293 +- 3.7% (20 datapoints) 8500.0 2.5% No Change
search-ftsb-10K-enwiki_abstract-hashes-term-withoutsuffix-trie 47489 +- 3.9% (20 datapoints) 49870.0 5.0% potential IMPROVEMENT
search-ftsb-10K-enwiki_abstract-hashes-term-withsuffix-trie 49893 +- 4.9% (20 datapoints) 48073.0 -3.6% potential REGRESSION
search-ftsb-370K-docs-union-iterators-q4 35 +- 0.7% (20 datapoints) 38.0 7.2% potential IMPROVEMENT
search-geo 3392 +- 4.9% (20 datapoints) 3591.0 5.9% potential IMPROVEMENT
search-hfe-write-read-concurrent 101 +- 2.1% (20 datapoints) 101.0 0.1% No Change
search-high-cardinality-negation-term-baseline 306 +- 1.1% (20 datapoints) 323.0 5.5% potential IMPROVEMENT
search-numeric-sortby-desc-optimize 556 +- 9.8% (20 datapoints) 601.0 8.2% waterline=9.8%. potential IMPROVEMENT
search-persist-doc-1000-seconds 35 +- 0.1% (20 datapoints) 36.0 1.9% No Change
vecsim-arxiv-titles-384-angular-filters-m16-ef-128-fulltext-filter 8939 +- 3.0% (20 datapoints) 8906.0 -0.4% No Change
vecsim-arxiv-titles-384-angular-filters-m16-ef-128-numeric-filter 2803 +- 5.0% (20 datapoints) 2842.0 1.4% No Change

Architecture: aarch64 — branch-over-branch

Deployment: oss-standalone

In summary:

  • Detected a total of 45 stable tests between versions.
  • Detected a total of 9 highly unstable benchmarks (9 baseline).
  • Latency analysis confirmed regressions in 1 of the unstable tests:
  • Detected a total of 7 improvements above the improvement water line.

You can check a comparison in detail via the grafana link

Performance Improvements - Comparison between master and gd_qast_fuzzy_query.

Time Period from a month ago. (environment used: oss-standalone)

Test Case Baseline master (median obs. +- std.dev) Comparison gd_qast_fuzzy_query (median obs. +- std.dev) % change (higher-better) Note
ftsb-10K-enwiki_abstract-hashes-term-suffix-withsuffixtrie 49093 +- 6.1% (20 datapoints) 57942 18.0% IMPROVEMENT
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-tags-distinct-k50 54 +- 7.4% (20 datapoints) 63 17.3% IMPROVEMENT
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-tags-k50 53 +- 7.7% (20 datapoints) 61 16.9% IMPROVEMENT
search-groupby-collect-10K-entity-events-json-cached-sortby-fields-star-offset500-k50 27 +- 5.3% (20 datapoints) 30 13.1% IMPROVEMENT
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-explicit-k50 44 +- 6.2% (20 datapoints) 49 12.0% IMPROVEMENT
ftsb-1M-enwiki_abstract-hashes-load 24626 +- 5.4% (20 datapoints) 27051 9.8% IMPROVEMENT
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-tags-duedate-k50 46 +- 6.0% (20 datapoints) 50 9.4% IMPROVEMENT

Performance Regressions and Issues - Comparison between master and gd_qast_fuzzy_query.

Time Period from a month ago. (environment used: oss-standalone)

Test Case Baseline master (median obs. +- std.dev) Comparison gd_qast_fuzzy_query (median obs. +- std.dev) % change (higher-better) Note
search-groupby-collect-10K-entity-events-json-cached-sortby-fields-explicit-k50 0.09 +- 29.0% UNSTABLE (20 datapoints) 0.06 -32.8% UNSTABLE (baseline high variance); server: p50 latency stable; client: client latency stable; neither server nor client side confirms regression
search-numeric-sortby 20899 +- 16.2% UNSTABLE (20 datapoints) 15744.00 -24.7% UNSTABLE (baseline high variance); server: FT.SEARCH p50 increased 32.8% (baseline CV=17.6%); client: Latency increased 32.7% (baseline CV=18.9%); confidence=LOW (FT.SEARCH baseline CV=19.5%; FT.SEARCH p99 +6.5% (stable baseline, minor change); CV=coefficient of variation (data stability: <30% stable, 30-50% moderate, >50% unstable))
ftsb-1M-enwiki_abstract-hashes-fulltext-2word-intersection-query-non-sortable 39 +- 22.4% UNSTABLE (20 datapoints) 37.00 -3.8% UNSTABLE (baseline high variance); server: p50 latency stable; client: client latency stable; neither server nor client side confirms regression
search-numeric 15567 +- 23.1% UNSTABLE (20 datapoints) 15197.00 -2.4% UNSTABLE (baseline high variance); server: p50 latency stable; client: client latency stable; neither server nor client side confirms regression
search-numeric-sortby-desc 20970 +- 17.2% UNSTABLE (20 datapoints) 21705.00 3.5% UNSTABLE (baseline high variance); server: FT.SEARCH p50 decreased 9.0% (baseline CV=20.9%); client: Latency decreased 34.4% (baseline CV=20.6%); neither server nor client side confirms regression
search-filtering-tag-numeric 5190 +- 10.6% UNSTABLE (20 datapoints) 5514.00 6.2% UNSTABLE (baseline high variance); server: FT.AGGREGATE p50 decreased 7.7% (baseline CV=13.7%); client: Latency decreased 6.0% (baseline CV=11.4%); neither server nor client side confirms regression
search-ftsb-1M-enwiki_abstract-hashes-fulltext-simple-1word-query-one-indexed-field 21626 +- 10.2% UNSTABLE (20 datapoints) 23632.00 9.3% UNSTABLE (baseline high variance); server: p50 latency stable; client: Latency decreased 8.6% (baseline CV=10.9%); neither server nor client side confirms regression
search-ftsb-1M-enwiki_abstract-hashes-gc 138 +- 10.0% UNSTABLE (20 datapoints) 160.00 15.9% UNSTABLE (baseline high variance); server: p50 latency stable; client: Latency decreased 14.0% (baseline CV=10.3%); neither server nor client side confirms regression
search-dropindex-keepdocs-gil-writer-contention 13895 +- 25.5% UNSTABLE (20 datapoints) 17411.00 25.3% UNSTABLE (baseline high variance); server: p50 latency stable; client: OverallQuantiles.allCommands.q50 decreased 21.5% (baseline CV=30.9%); neither server nor client side confirms regression
Tests with No Significant Changes (45 tests)

Tests with No Significant Changes

Test Case Baseline master (median obs. +- std.dev) Comparison gd_qast_fuzzy_query (median obs. +- std.dev) % change (higher-better) Note
ftsb-10K-enwiki_abstract-hashes-fulltext-sortby 1127 +- 3.5% (20 datapoints) 1124.0 -0.3% No Change
ftsb-10K-enwiki_abstract-hashes-term-prefix 25786 +- 3.2% (20 datapoints) 27484.0 6.6% potential IMPROVEMENT
ftsb-10K-enwiki_abstract-hashes-term-suffix 26389 +- 2.2% (20 datapoints) 27393.0 3.8% potential IMPROVEMENT
ftsb-10K-enwiki_abstract-hashes-term-wildcard 39583 +- 4.0% (20 datapoints) 38185.0 -3.5% potential REGRESSION
ftsb-10K-enwiki_pages-hashes-fulltext-mixed_simple-1word-query_write_1_to_read_20.yml 1952 +- 3.2% (20 datapoints) 2039.0 4.5% potential IMPROVEMENT
ftsb-10K-enwiki_pages-hashes-load 59843 +- 4.2% (20 datapoints) 58089.0 -2.9% No Change
ftsb-10K-multivalue-numeric-json 5360 +- 1.9% (20 datapoints) 5213.0 -2.7% No Change
ftsb-10K-singlevalue-numeric-json 3008 +- 1.1% (20 datapoints) 2972.0 -1.2% No Change
ftsb-1K-enwiki_abstract-hashes-term-contains 20396 +- 1.3% (20 datapoints) 20406.0 0.1% No Change
ftsb-1M-enwiki_abstract-hashes-fulltext-2word-intersection-query 5568 +- 5.5% (20 datapoints) 5653.0 1.5% No Change
ftsb-1M-enwiki_abstract-hashes-fulltext-2word-union-query 26650 +- 3.2% (20 datapoints) 27790.0 4.3% potential IMPROVEMENT
ftsb-1M-enwiki_abstract-hashes-fulltext-2word-union-query-non-sortable 1293 +- 6.4% (20 datapoints) 1325.0 2.4% No Change
ftsb-1M-enwiki_abstract-hashes-fulltext-simple-1word-query 13435 +- 5.1% (20 datapoints) 14251.0 6.1% potential IMPROVEMENT
ftsb-1M-nyc_taxis-ftadd-load 27611 +- 2.6% (20 datapoints) 28522.0 3.3% potential IMPROVEMENT
ftsb-1M-nyc_taxis-hashes-load 29690 +- 2.6% (20 datapoints) 29638.0 -0.2% No Change
search-aggregate-post-filter-simple.yml 60363 +- 9.8% (20 datapoints) 55082.0 -8.7% waterline=9.8%. potential REGRESSION
search-expire-doc-10-milliseconds 14 +- 2.3% (20 datapoints) 14.0 1.4% No Change
search-expire-doc-1000-seconds 14 +- 2.5% (20 datapoints) 14.0 1.7% No Change
search-expire-doc-50-50-10-milliseconds 50 +- 0.1% (20 datapoints) 50.0 0.0% No Change
search-expire-doc-json-10-milliseconds 18115 +- 1.1% (20 datapoints) 18218.0 0.6% No Change
search-expire-doc-multi-index-10-milliseconds 32 +- 0.1% (20 datapoints) 32.0 0.2% No Change
search-expire-numeric-field-10-milliseconds 14 +- 2.9% (20 datapoints) 14.0 -1.5% No Change
search-expire-numeric-field-1000-seconds 14 +- 2.7% (20 datapoints) 14.0 -1.1% No Change
search-expire-write-read-concurrent 98 +- 1.4% (20 datapoints) 98.0 -0.5% No Change
search-filtering-tag-numeric-filter-pipeline 24940 +- 3.0% (20 datapoints) 25346.0 1.6% No Change
search-ftsb-10K-enwiki_abstract-hashes-fulltext-aggregate-sortby-limit-0-100 7053 +- 3.4% (20 datapoints) 7181.0 1.8% No Change
search-ftsb-10K-enwiki_abstract-hashes-fulltext-search-sortby-limit-0-100 6985 +- 3.7% (20 datapoints) 7157.0 2.5% No Change
search-ftsb-10K-enwiki_abstract-hashes-term-withoutsuffix-trie 33848 +- 3.6% (20 datapoints) 33919.0 0.2% No Change
search-ftsb-10K-enwiki_abstract-hashes-term-withsuffix-trie 33966 +- 3.4% (20 datapoints) 33888.0 -0.2% No Change
search-ftsb-1700K-docs-union-iterators-q3 33 +- 0.7% (20 datapoints) 33.0 -0.6% No Change
search-ftsb-1M-enwiki_abstract-hashes-fulltext-simple-1word-query-non-sortable 160 +- 5.6% (20 datapoints) 160.0 0.2% No Change
search-ftsb-370K-docs-union-iterators-q4 35 +- 0.7% (20 datapoints) 35.0 -1.5% No Change
search-ftsb-5200K-docs-union-iterators-q1 3.4 +- 1.9% (20 datapoints) 3.3 -3.1% potential REGRESSION
search-ftsb-5500K-docs-union-iterators-q2 5.2 +- 3.2% (20 datapoints) 5.2 0.6% No Change
search-ftsb-arxiv-titles-384-angular-filters-m16-ef-128-json-load 3597 +- 3.1% (20 datapoints) 3728.0 3.6% potential IMPROVEMENT
search-geo 2805 +- 4.7% (20 datapoints) 2871.0 2.3% No Change
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-star-offset500-k50 37 +- 4.4% (20 datapoints) 40.0 6.5% potential IMPROVEMENT
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-tags-duedate-distinct-k50 43 +- 5.5% (20 datapoints) 43.0 -0.8% No Change
search-hfe-write-read-concurrent 98 +- 1.0% (20 datapoints) 98.0 -0.4% No Change
search-high-cardinality-negation-term-baseline 306 +- 1.1% (20 datapoints) 300.0 -1.9% No Change
search-high-cardinality-negation-term-comparison_union_all_other_terms 153 +- 1.6% (20 datapoints) 151.0 -1.0% No Change
search-numeric-optimize 15085 +- 1.7% (20 datapoints) 14795.0 -1.9% No Change
search-numeric-sortby-desc-optimize 496 +- 6.2% (20 datapoints) 490.0 -1.3% No Change
search-numeric-sortby-optimize 446 +- 6.5% (20 datapoints) 447.0 0.2% No Change
search-persist-doc-1000-seconds 35 +- 0.1% (20 datapoints) 35.0 0.3% No Change

Cross-arch delta on gd_qast_fuzzy_query (x86_64 → aarch64)

Same commit (gd_qast_fuzzy_query) compared across architectures. Positive deltas = aarch64 outperforms x86_64.

In summary:

You can check a comparison in detail via the grafana link

Performance Improvements - Comparison between gd_qast_fuzzy_query and gd_qast_fuzzy_query.

Time Period from a month ago. (environment used: oss-standalone)

Test Case Baseline gd_qast_fuzzy_query (median obs. +- std.dev) Comparison gd_qast_fuzzy_query (median obs. +- std.dev) % change (higher-better) Note
ftsb-1M-enwiki_abstract-hashes-fulltext-simple-1word-query 12873 +- 8.6% (5 datapoints) 14251 10.7% waterline=8.6%. IMPROVEMENT

Performance Regressions and Issues - Comparison between gd_qast_fuzzy_query and gd_qast_fuzzy_query.

Time Period from a month ago. (environment used: oss-standalone)

Test Case Baseline gd_qast_fuzzy_query (median obs. +- std.dev) Comparison gd_qast_fuzzy_query (median obs. +- std.dev) % change (higher-better) Note
search-groupby-collect-10K-entity-events-json-cached-sortby-fields-explicit-k50 8.2 +- 8.2% (4 datapoints) 0.06 -99.2% waterline=8.2%. REGRESSION
search-aggregate-post-filter-simple.yml 99583 +- 10.8% UNSTABLE (4 datapoints) 55082.00 -44.7% UNSTABLE (baseline high variance); server: FT.AGGREGATE p50 increased 82.6% (baseline CV=8.9%); only server side confirms regression (client side stable) - insufficient evidence
ftsb-1M-enwiki_abstract-hashes-fulltext-2word-intersection-query-non-sortable 64 +- 14.4% UNSTABLE (5 datapoints) 37.00 -41.8% UNSTABLE (baseline high variance); server: FT.SEARCH p50 decreased 5.7% (baseline CV=14.3%); client: client latency stable; neither server nor client side confirms regression
search-numeric-sortby 24377 +- 15.2% UNSTABLE (4 datapoints) 15744.00 -35.4% UNSTABLE (baseline high variance); server: FT.SEARCH p50 increased 31.7% (baseline CV=13.7%); client: Latency increased 54.5% (baseline CV=14.6%); confidence=HIGH (FT.SEARCH baseline CV=16.4%; FT.SEARCH p99 +30.8% (stable baseline); CV=coefficient of variation (data stability: <30% stable, 30-50% moderate, >50% unstable))
search-numeric 22831 +- 24.1% UNSTABLE (4 datapoints) 15197.00 -33.4% UNSTABLE (baseline high variance); server: FT.SEARCH p50 increased 24.8% (baseline CV=15.6%); client: client latency stable; only server side confirms regression (client side stable) - insufficient evidence
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-tags-duedate-distinct-k50 64 +- 4.3% (2 datapoints) 43.00 -32.9% REGRESSION
search-ftsb-10K-enwiki_abstract-hashes-term-withsuffix-trie 48800 +- 2.5% (4 datapoints) 33888.00 -30.6% REGRESSION
search-ftsb-10K-enwiki_abstract-hashes-term-withoutsuffix-trie 48682 +- 5.4% (4 datapoints) 33919.00 -30.3% REGRESSION
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-explicit-k50 70 +- 8.0% (4 datapoints) 49.00 -29.6% waterline=8.0%. REGRESSION
ftsb-10K-singlevalue-numeric-json 4187 +- 7.4% (5 datapoints) 2972.00 -29.0% REGRESSION
search-groupby-collect-10K-entity-events-json-cached-sortby-fields-star-offset500-k50 41 +- 3.9% (4 datapoints) 30.00 -26.2% REGRESSION
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-star-offset500-k50 53 +- 14.8% UNSTABLE (4 datapoints) 40.00 -25.6% UNSTABLE (baseline high variance); server: FT.AGGREGATE p50 increased 38.9% (baseline CV=18.8%); client: OverallQuantiles.allCommands.q50 increased 33.3% (baseline CV=15.6%); confidence=LOW (FT.AGGREGATE baseline CV=9.0%; FT.AGGREGATE p99 0.0% (stable baseline, minor change); CV=coefficient of variation (data stability: <30% stable, 30-50% moderate, >50% unstable))
search-expire-numeric-field-10-milliseconds 18 +- 9.6% (7 datapoints) 14.00 -25.2% waterline=9.6%. REGRESSION
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-tags-k50 82 +- 0.3% (2 datapoints) 61.00 -25.1% REGRESSION
ftsb-1M-enwiki_abstract-hashes-fulltext-2word-union-query-non-sortable 1755 +- 20.7% UNSTABLE (4 datapoints) 1325.00 -24.5% UNSTABLE (baseline high variance); server: FT.SEARCH p50 increased 8.9% (baseline CV=15.8%); client: OverallQuantiles.allCommands.q50 increased 31.9% (baseline CV=19.2%); only client side confirms regression (server side stable) - insufficient evidence
ftsb-10K-enwiki_abstract-hashes-term-suffix-withsuffixtrie 76465 +- 7.1% (5 datapoints) 57942.00 -24.2% REGRESSION
search-numeric-sortby-desc-optimize 625 +- 5.6% (4 datapoints) 490.00 -21.6% REGRESSION
ftsb-10K-enwiki_abstract-hashes-term-suffix 34662 +- 4.7% (5 datapoints) 27393.00 -21.0% REGRESSION
search-filtering-tag-numeric-filter-pipeline 31739 +- 4.9% (11 datapoints) 25346.00 -20.1% REGRESSION
search-geo 3570 +- 4.6% (4 datapoints) 2871.00 -19.6% REGRESSION
ftsb-10K-enwiki_abstract-hashes-term-prefix 34113 +- 4.2% (5 datapoints) 27484.00 -19.4% REGRESSION
ftsb-1M-enwiki_abstract-hashes-fulltext-2word-intersection-query 7002 +- 8.5% (5 datapoints) 5653.00 -19.3% waterline=8.5%. REGRESSION
ftsb-1M-nyc_taxis-ftadd-load 35340 +- 6.6% (5 datapoints) 28522.00 -19.3% REGRESSION
search-expire-doc-1000-seconds 17 +- 12.4% UNSTABLE (8 datapoints) 14.00 -18.3% UNSTABLE (baseline high variance); server: p50 latency stable; client: Latency increased 16.6% (baseline CV=7.3%); only client side confirms regression (server side stable) - insufficient evidence
search-expire-doc-10-milliseconds 17 +- 9.4% (6 datapoints) 14.00 -18.0% waterline=9.4%. REGRESSION
search-numeric-sortby-optimize 529 +- 10.6% UNSTABLE (4 datapoints) 447.00 -15.5% UNSTABLE (baseline high variance); server: FT.SEARCH p50 increased 6.0% (baseline CV=9.0%); client: Latency increased 17.4% (baseline CV=10.8%); only client side confirms regression (server side stable) - insufficient evidence
search-ftsb-1700K-docs-union-iterators-q3 39 +- 8.3% (12 datapoints) 33.00 -15.4% waterline=8.3%. REGRESSION
search-ftsb-5500K-docs-union-iterators-q2 6.1 +- 8.5% (8 datapoints) 5.20 -14.4% waterline=8.5%. REGRESSION
search-ftsb-10K-enwiki_abstract-hashes-fulltext-aggregate-sortby-limit-0-100 8366 +- 2.8% (5 datapoints) 7181.00 -14.2% REGRESSION
search-ftsb-5200K-docs-union-iterators-q1 3.8 +- 6.1% (11 datapoints) 3.30 -13.3% REGRESSION
ftsb-1M-enwiki_abstract-hashes-load 31078 +- 9.3% (5 datapoints) 27051.00 -13.0% waterline=9.3%. REGRESSION
search-ftsb-10K-enwiki_abstract-hashes-fulltext-search-sortby-limit-0-100 8195 +- 2.9% (5 datapoints) 7157.00 -12.7% REGRESSION
search-expire-numeric-field-1000-seconds 16 +- 11.2% UNSTABLE (5 datapoints) 14.00 -12.5% UNSTABLE (baseline high variance); server: p50 latency stable; client: Latency increased 14.6% (baseline CV=5.4%); only client side confirms regression (server side stable) - insufficient evidence
search-ftsb-1M-enwiki_abstract-hashes-fulltext-simple-1word-query-non-sortable 179 +- 8.2% (4 datapoints) 160.00 -10.8% waterline=8.2%. REGRESSION
search-ftsb-370K-docs-union-iterators-q4 38 +- 7.5% (12 datapoints) 35.00 -9.9% REGRESSION
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-tags-distinct-k50 70 +- 35.0% UNSTABLE (2 datapoints) 63.00 -9.7% UNSTABLE (baseline high variance); server: FT.AGGREGATE p50 increased 15.5% (baseline CV=36.8%); client: client latency stable; only server side confirms regression (client side stable) - insufficient evidence
ftsb-1M-enwiki_abstract-hashes-fulltext-2word-union-query 30593 +- 6.5% (5 datapoints) 27790.00 -9.2% REGRESSION
ftsb-10K-enwiki_pages-hashes-fulltext-mixed_simple-1word-query_write_1_to_read_20.yml 2221 +- 7.4% (4 datapoints) 2039.00 -8.2% REGRESSION
search-numeric-sortby-desc 22365 +- 21.5% UNSTABLE (4 datapoints) 21705.00 -2.9% UNSTABLE (baseline high variance); server: FT.SEARCH p50 decreased 8.7% (baseline CV=16.5%); client: Latency decreased 30.1% (baseline CV=16.9%); neither server nor client side confirms regression
search-ftsb-1M-enwiki_abstract-hashes-gc 162 +- 19.7% UNSTABLE (4 datapoints) 160.00 -1.6% UNSTABLE (baseline high variance); server: p50 latency stable; client: Latency decreased 20.6% (baseline CV=15.5%); neither server nor client side confirms regression
search-high-cardinality-negation-term-baseline 303 +- 33.6% UNSTABLE (10 datapoints) 300.00 -1.0% UNSTABLE (baseline high variance); server: p50 latency stable; client: client latency stable; neither server nor client side confirms regression
search-ftsb-1M-enwiki_abstract-hashes-fulltext-simple-1word-query-one-indexed-field 22614 +- 12.3% UNSTABLE (5 datapoints) 23632.00 4.5% UNSTABLE (baseline high variance); server: FT.SEARCH p50 increased 14.1% (baseline CV=4.6%); client: Latency decreased 6.6% (baseline CV=11.1%); only server side confirms regression (client side stable) - insufficient evidence
search-filtering-tag-numeric 4722 +- 12.8% UNSTABLE (12 datapoints) 5514.00 16.8% UNSTABLE (baseline high variance); server: FT.AGGREGATE p50 decreased 46.9% (baseline CV=24.4%); client: Latency decreased 14.4% (baseline CV=11.8%); neither server nor client side confirms regression
search-dropindex-keepdocs-gil-writer-contention 10958 +- 33.0% UNSTABLE (6 datapoints) 17411.00 58.9% UNSTABLE (baseline high variance); server: p50 latency stable; client: OverallQuantiles.allCommands.q50 decreased 11.7% (baseline CV=36.1%); neither server nor client side confirms regression
Tests with No Significant Changes (16 tests)

Tests with No Significant Changes

Test Case Baseline gd_qast_fuzzy_query (median obs. +- std.dev) Comparison gd_qast_fuzzy_query (median obs. +- std.dev) % change (higher-better) Note
ftsb-10K-enwiki_abstract-hashes-fulltext-sortby 1140 +- 2.3% (6 datapoints) 1124 -1.4% No Change
ftsb-10K-enwiki_abstract-hashes-term-wildcard 38135 +- 2.9% (6 datapoints) 38185 0.1% No Change
ftsb-10K-enwiki_pages-hashes-load 58089 +- 1.7% (5 datapoints) 58089 0.0%
ftsb-10K-multivalue-numeric-json 5421 +- 3.1% (5 datapoints) 5213 -3.8% potential REGRESSION
ftsb-1K-enwiki_abstract-hashes-term-contains 20406 +- 2.1% (5 datapoints) 20406 0.0%
ftsb-1M-nyc_taxis-hashes-load 29823 +- 1.5% (6 datapoints) 29638 -0.6% No Change
search-expire-doc-50-50-10-milliseconds 50 +- 0.2% (5 datapoints) 50 0.6% No Change
search-expire-doc-json-10-milliseconds 18122 +- 0.9% (12 datapoints) 18218 0.5% No Change
search-expire-doc-multi-index-10-milliseconds 32 +- 0.6% (5 datapoints) 32 0.0% No Change
search-expire-write-read-concurrent 100 +- 1.3% (7 datapoints) 98 -2.7% No Change
search-ftsb-arxiv-titles-384-angular-filters-m16-ef-128-json-load 3645 +- 3.9% (3 datapoints) 3728 2.3% No Change
search-groupby-collect-10K-entity-events-hash-cached-sortby-fields-tags-duedate-k50 47 +- 8.5% (2 datapoints) 50 6.0% waterline=8.5%. potential IMPROVEMENT
search-hfe-write-read-concurrent 100 +- 2.4% (9 datapoints) 98 -2.2% No Change
search-high-cardinality-negation-term-comparison_union_all_other_terms 153 +- 0.8% (8 datapoints) 151 -0.9% No Change
search-numeric-optimize 14795 +- 2.1% (3 datapoints) 14795 0.0%
search-persist-doc-1000-seconds 35 +- 0.9% (5 datapoints) 35 -0.6% No Change

@gdesmott
gdesmott force-pushed the gd_qast_fuzzy_query branch from dba8ed7 to 957df9d Compare August 12, 2026 06:45
@gdesmott
gdesmott force-pushed the gd_qast_fuzzy_query branch from 957df9d to 797cdf1 Compare August 12, 2026 07:49
@gdesmott
gdesmott force-pushed the gd_qast_fuzzy_tests branch from 8039cc3 to 05534d1 Compare August 12, 2026 07:49
@gdesmott
gdesmott force-pushed the gd_qast_fuzzy_query branch 2 times, most recently from 0f62d58 to 1451b2d Compare August 12, 2026 08:55
LukeMathWalker
LukeMathWalker previously approved these changes Aug 17, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 605a94e44b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

LukeMathWalker
LukeMathWalker previously approved these changes Aug 17, 2026

@LukeMathWalker LukeMathWalker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later on, we may indeed want to thread through a spec lock guard to derive lifetimes from.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a5748bf620

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

A new nodes/fuzzy.rs walks the terms trie through c_trie's iterate_fuzzy and
accumulates the per-term readers on the Expansion the prefix and wildcard nodes
already share, then unions them. QN_FUZZY joins both dispatch arms — the Rust
one and, in query.c, the ported arm of Query_EvalNode — so Query_EvalFuzzyNode
goes with it. iterateExpandedTerms and addTerm had no other caller (QN_PREFIX
stopped using them when it was ported), so both go too, and with them the second
copy of the expansion logic that could drift from the Rust one.

Two things the shared expansion could not express before:

A pattern the trie declines to walk yields no iterator at all, where a walk that
matched nothing yields an empty union — so the walk's outcome is propagated out
to eval rather than folded into the accumulated children.

The empty-term expansion, which a token no longer than the distance reaches from
apiVersion 2, is appended after the walk and is not one of the terms the cap
bounds. push_child_ignoring_cap admits it with the cap full and without
recording the truncation warning, which push_child now delegates to.

Its document count is looked up as the zero-length key rather than as C's
one-rune NUL. Both are zero whatever the index holds — the trie refuses a
zero-length key on insertion, and TrieNode_Get cannot match one — so this is the
same value said more directly. It is computed only on the disk path, which is
the only consumer, for the term's IDF.

The empty-term gate is widened to i64, so a negative distance closes it rather
than wrapping C's size_t comparison open. No query can produce one: every
QueryFuzzyNode is built with 1, 2 or 3.

PrefixNode_GetTypeString stays: the AST dump still uses it. So do the QN_FUZZY
arms of the node-lifetime, dump, param and profile switches, which this change
does not touch. queryNeedsOffsets, whose only C caller was addTerm's disk
branch, is left exported for now; dropping an unused FFI symbol belongs to a
pass over that surface rather than to this port.
The parser garantees that maxDist is not higher than 3.
See query_parser/v2/parser.y:641-651

Higher value would result in out of bound reads so best to enforce it.
Four evaluators — token, prefix, wildcard_query and fuzzy — each borrowed the
spec's terms trie behind its own debug_assert and its own SAFETY comment citing
QueryEvalContext invariants 1/2. Those invariants cover validity and
non-mutation but say nothing about the field being non-null, so each site was
carrying an unwritten assumption and re-justifying it in slightly different
words.

The invariant now lives where the rest of the context's pointer contract does,
on QueryEvalContext::new: every path that creates an IndexSpec installs a terms
trie, unconditionally and whether or not the schema has a text field, and the
one path that leaves the field null for a while fills it in — or releases the
half-built spec — before the spec can answer a query.

A terms_trie accessor on QueryEvalContext asserts it in one place and hands
back the wrapper, so a spec that broke the invariant names what went wrong in a
debug or test build instead of being a null dereference in whichever evaluator
ran first.

The accessor is unsafe, because the reference it returns is tied to no
lifetime the type system can check. That erasure is deliberate: the trie is
owned by the spec rather than by the context, and binding the reference to
&self would say otherwise and stop an evaluator holding the trie while
borrowing the context exclusively — which the expanding nodes do across a walk
that records expansions back into the context. Discharging it is the caller's
job, so the accessor states the contract (the reference must not outlive the
query) and each evaluator states why its own reference stays inside it.
The fuzzy expansion looked the empty term's document count up in the terms
trie on the disk path, to score its IDF. The count is zero whatever the index
holds — a zero-length key is refused on insertion, so the trie cannot hold one
— and the lookup was already commented as such, so it asked a question whose
answer was written next to it.

Asking it was not free: the lookup hands the key to a decoder that forms
src + slen before testing that its loop is empty, and an empty slice's pointer
need not point into an allocation for C to do that arithmetic on. The fuzzy
walk one call away already keeps an empty pattern away from the same decoder,
with a static sentinel byte, and the wildcard node already passes zero for its
own empty term rather than looking it up.

So the fuzzy path passes zero directly, and num_docs answers the empty term
without reaching for C at all, which keeps any future caller off the same path.
Both are covered by new tests: num_docs had none of its own before.
@gdesmott
gdesmott force-pushed the gd_qast_fuzzy_query branch from e5eb97c to d9d8b03 Compare August 17, 2026 12:28
@gdesmott
gdesmott enabled auto-merge August 17, 2026 12:41
@sonarqubecloud

Copy link
Copy Markdown

@gdesmott gdesmott removed action:run-benchmark bench:vs-master Use master as baseline when comparing benchmarks labels Aug 17, 2026
@gdesmott
gdesmott added this pull request to the merge queue Aug 17, 2026
Merged via the queue into master with commit 81885bc Aug 17, 2026
76 of 82 checks passed
@gdesmott
gdesmott deleted the gd_qast_fuzzy_query branch August 17, 2026 13:32
@gdesmott gdesmott mentioned this pull request Nov 16, 2026
1 of 4 tasks
gdesmott added a commit that referenced this pull request Nov 16, 2026
C stopped calling CalculateIDF and CalculateIDF_BM25 in 81885bc
(query_eval: evaluate QN_FUZZY in Rust, #10860), which ported the last
C caller to Rust. Rust code uses the idf crate directly.
JonasKruckenberg pushed a commit to mainmatter/RediSearch that referenced this pull request Nov 19, 2026
C stopped calling CalculateIDF and CalculateIDF_BM25 in 81885bc
(query_eval: evaluate QN_FUZZY in Rust, RediSearch#10860), which ported the last
C caller to Rust. Rust code uses the idf crate directly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants