Skip to content

storage: a one-term search proposes every posting sharing the term's first bytes #1112

Open

Description

@chappie-daemon

term_range is a prefix range over events_by_term, so a one-term query proposes every posting whose term shares the term's first bytes, and a one-term query has no cheap reject — each candidate costs a body decode.

Measured by the round-2 performance lens of job 028 on the fixture corpus: "a" proposes 414 candidates for 49 matches, "c" 254 for 2, "bit" 54 for 1. Against a million-row store that is roughly 9% of all postings for a single REQ.

It is what spec R7 / Values row 20 specify, so it shipped as a known limit rather than a defect. The key-shape change is known: terminate the term in the key so an exact-term range is a true equality range, and bump SEARCH_INDEX_VERSION so every existing store rebuilds rather than migrating.

What decides it: a bench or a counter over the fixture corpus showing candidate count ≈ match count for one-term queries, with the marker bumped.

Activity

  1. added
    bugSomething isn't working
    rewritenostream 4.0 Rust/LMDB rewrite
    rustRust implementation work
    on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrewritenostream 4.0 Rust/LMDB rewriterustRust implementation work

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions