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

blevesearch / bleve / 29896019522
52%

Build:
DEFAULT BRANCH: master
Ran 22 Jul 2026 06:13AM 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

22 Jul 2026 06:12AM UTC coverage: 52.304% (-0.02%) from 52.321%
29896019522

push

github

web-flow
MB-72489: standalone query hot-path optimizations (#2381)

Five standalone performance optimizations on query hot paths, each
independently benchmarked (Apple M4 Pro, benchstat). No functional/API
changes.

### Changes

- **Fast-path `prepareDocumentMatch` + guard `adjustDocumentMatch` for
non-KNN queries** — skip KNN adjustment and the always-false prepare
branches on simple score-sorted queries. `Top{K}of{N}Scores` geomean
**-1.8%**.
- **Close orphaned sub-searchers after unadorned disjunction
optimization** *(correctness fix)* — `newDisjunctionSearcher` never
closed the original N sub-searchers after the `disjunction:unadorned`
optimization, so their TermFieldReaders were never released and
search-accounting was skipped. Now closed immediately after the
optimization succeeds.
- **Skip empty-bitmap work in `disjunction:unadorned` `Finish()`** —
remove a dead O(segments × terms) loop and reuse empty/1-hit iterator
singletons instead of allocating. Also lets the empty sentinel compose
in nested disjunction/conjunction optimizations.
- **Specialized score-descending comparator for the top-N collector** —
detect the common single-score-descending sort at construction time and
compare `Score` directly instead of walking the generic sort-order path.
Collector geomean **-11.6%** for score-sorted queries.
- **`MergeFieldTermLocations` fast-path + `DocumentMatch.Reset`
nil-guard** — early-return when no match carries field-term locations
(**-49%**), and skip `clear()` on a nil score breakdown (**-13%**). Both
run per scored candidate.

Benchmarks for each change are included in the diff. Marked draft
pending review.

---------

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

52 of 131 new or added lines in 8 files covered. (39.69%)

4 existing lines in 1 file now uncovered.

19862 of 37974 relevant lines covered (52.3%)

0.59 hits per line

Uncovered Changes

Lines Coverage ∆ File
37
53.79
0.79% search/collector/topn.go
15
17.41
-0.55% search/sort.go
12
0.0
0.0% index/scorch/optimize.go
5
6.25
-0.25% index/scorch/unadorned.go
3
0.0
0.0% index/scorch/empty.go
3
20.2
-0.63% search/util.go
2
33.89
-0.56% search/search.go
2
79.75
-1.33% search/searcher/search_disjunction.go

Coverage Regressions

Lines Coverage ∆ File
4
53.79
0.79% search/collector/topn.go
Jobs
ID Job ID Ran Files Coverage
1 29896019522.1 22 Jul 2026 06:13AM UTC 429
52.3
GitHub Action Run
Source Files on build 29896019522
  • Tree
  • List 429
  • Changed 9
  • Source Changed 0
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 991a4506 on github
  • Prev Build on master (#29515324004)
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