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
    bug
    rewrite
    rust
    on Nov 11, 2026
  2. self-assigned this
    on Nov 18, 2026
  3. added 2 commits that reference this issue on Nov 18, 2026
    6d2f45c
    3c33eb6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugrewriterust

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions