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

blevesearch / bleve / 30267049682 / 1
53%
master: 52%

Build:
Build:
LAST BUILD BRANCH: perf-gar-v17-collector
DEFAULT BRANCH: master
Ran 27 Jul 2026 12:44PM UTC
Files 429
Run time 9s
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

27 Jul 2026 12:40PM UTC coverage: 52.502% (+0.2%) from 52.323%
30267049682.1

Pull #2385

github

maneuvertomars
collector: early-stop (bounded scan) for score=none + Size=k

With Score="none" and a bounded Size, the request means "return any Size+From
matching documents" — nothing about the result depends on the matches beyond that.
So the collector can stop pulling from the searcher once it has them, instead of
draining the entire match set to count it.

On a 500k-doc corpus this is the difference between scanning every match and
scanning ten: BenchmarkEarlyStopTermTier1ScoreNone goes 18.15ms -> 8.4us and
EarlyStopDisjMin2ScoreNone 41.79ms -> 22.6us on the full branch.

Because the scan really does stop counting, Total becomes a lower bound, and saying
otherwise would silently mislead callers. This adds SearchResult.TotalRelation
("eq" | "gte") to report that, plus the merge rule that any constituent reporting
"gte" makes a merged Total "gte" too.

Gated on the result being independent of unseen documents — no facets (every match
must be counted into the buckets), no KNN (separate hit set), no SearchAfter (the
cursor depends on the full ordering), no nested rollup, no reverse execution, and
sort-by-score only (which degrades to arrival order under score="none"; a field
sort could have its top-k anywhere in the match set).

Two deviations from perf-gar-mod-fix-2's version of this work, both because that
branch's WAND machinery is not present here:

  - TotalRelation is introduced here rather than in 0f565526, which bundled the
    public API with the WANDPruned collector plumbing and the disjunction-searcher
    changes that set it. On this branch the bounded scan is the only producer of a
    lower-bound Total, so the API arrives with its first user and nothing about it
    is dead.
  - index_impl derives TotalRelation from coll.EarlyStopped() alone, not
    "coll.WANDPruned() || coll.EarlyStopped()".

The upstream commit shipped no tests. Added earlystop_test.go, because the
preconditions above are the whole correctness argument and getting one wrong is a
sil... (continued)
Pull Request #2385: perf: top-N collector optimizations (perf-gar v17-only, 1/3)

19977 of 38050 relevant lines covered (52.5%)

0.59 hits per line

Source Files on job 30267049682.1
  • Tree
  • List 429
  • Changed 7
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 30267049682
  • 6050b0c0 on github
  • Prev Job for on perf-gar-v17-collector (#30118928861.1)
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