Skip to content

index: preserve overlapping file rank penalties - #1164

Open
keegancsmith wants to merge 1 commit into
mainfrom
k/rank-fix
Open

index: preserve overlapping file rank penalties#1164
keegancsmith wants to merge 1 commit into
mainfrom
k/rank-fix

Conversation

@keegancsmith

Copy link
Copy Markdown
Member

April’s indexing optimization (#1036) reused a single precomputed category for ranking, losing overlapping penalties such as generated tests. Compute independent rank flags alongside the category before discarding skipped content, keeping ranking cheap without growing Document on amd64.

The index format stays unchanged. Merge/explode retain stored categories (as fixed in #1073) and document order; regression tests cover that round trip and skipped-content handling.

Precomputed file categories retain only the first matching classification, so generated tests and similar overlaps lost ranking penalties after the indexing optimization. Compute independent ranking flags alongside the category before skipped content is discarded, keeping ranking cheap without having to reconstruct classifications later.

The flags fit in existing Document padding on amd64 and are only needed for initial shard ordering. Keep the persisted category and index format unchanged: merge and explode preserve stored categories and relative document order rather than re-ranking reconstructed documents.

Amp-Thread-ID: https://ampcode.com/threads/T-01a06c1b-9f70-777d-949b-61443d2d73c1
Co-authored-by: Amp <amp@ampcode.com>
@keegancsmith
keegancsmith marked this pull request as ready for review September 6, 2026 15:43
@keegancsmith
keegancsmith requested review from a team and stefanhengl September 6, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant