• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

blevesearch / bleve / 30118928861
52%

Build:
DEFAULT BRANCH: master
Ran 24 Jul 2026 06:58PM UTC
Jobs 1
Files 429
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

24 Jul 2026 06:57PM UTC coverage: 52.323% (+0.02%) from 52.304%
30118928861

push

github

web-flow
MB-72489: fuzzy/regexp candidate-collection optimizations (#2382)

Split out from #2381 per review — the fuzzy/regexp candidate-collection
optimizations, as their own PR. No functional/API changes.

### Changes

- **Trim fuzzy candidate-collection overhead**
(`search/searcher/search_fuzzy.go`): skip the per-candidate dedup map
when the field has no synonyms (the dictionary iterator already yields
each term once; the map only exists to de-dup synonym terms), replace
the O(n²) `prefixTerm` rune-concat with a zero-alloc slice, and hoist
repeated `ctx.Value` lookups.
- **Omit postings-count read for fuzzy/regexp candidate collection**
(`index/scorch/snapshot_index*.go`): fuzzy/regexp collectors use only
the term + edit distance and discard `DictEntry.Count`, yet the segment
iterator read each candidate's postings list to compute it. A new opt-in
`AutomatonIteratorOmitCount` path skips that read, wired via a graceful
type-assertion fallback. `FieldDict`/`FieldDictPrefix`/`FieldDictRange`
still populate counts.

**Depends on** blevesearch/zapx#436 — the omit-count optimization
activates once the `zapx/v17` dependency is bumped to a release that
includes `AutomatonIteratorOmitCount`. Until then the wiring falls back
to the count-reading path (the wiring test skips), so this is safe to
merge independently.

### Benchmark

`BenchmarkFuzzyCandidateCollection` (scorch index, 1000 terms / 3000
docs, fuzziness-2 query matching 280 candidates), original → both
commits, Apple M4 Pro, count=12 via benchstat:

| | sec/op | B/op | allocs/op |
|---|---|---|---|
| micro-opts | −5.9% | −3.8% | −1.3% (988→975) |
| omit-count wiring | −9.7% | −1.1% | −29.1% (975→691) |
| **combined** | **−15.0%** | **−4.8%** | **−30.1%** (988→691) |

All p=0.000, n=12. Verified with the full fuzzy + synonym search suites
and `-race`.

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Thejas-bhat <thejas.orkombu@couchbase.com>

19 of 50 new or added lines in 3 files covered. (38.0%)

9 existing lines in 3 files now uncovered.

19877 of 37989 relevant lines covered (52.32%)

0.59 hits per line

Uncovered Changes

Lines Coverage ∆ File
27
48.8
-2.47% search/searcher/search_fuzzy.go
3
53.37
1.88% index/scorch/snapshot_index.go
1
61.97
1.37% index/scorch/snapshot_index_dict.go

Coverage Regressions

Lines Coverage ∆ File
5
80.65
-0.96% index/scorch/merge.go
2
71.54
-0.79% index/scorch/snapshot_segment.go
2
48.8
-2.47% search/searcher/search_fuzzy.go
Jobs
ID Job ID Ran Files Coverage
1 30118928861.1 24 Jul 2026 06:58PM UTC 429
52.32
GitHub Action Run
Source Files on build 30118928861
  • Tree
  • List 429
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • dbdaa130 on github
  • Prev Build on master (#29896019522)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc