simplify: query* (5 passes) - #1902
Merged
Merged
Conversation
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
|
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tracedecay-query,tracedecay-temporal-query, andtracedecay-search-eval.7 files, +425 / -663.Motivation
The two lexical projections (in-memory search-eval adapter and the artifact reader) and the temporal ranker had copied score and identity plumbing. Dead duplication, not a behavior change.
Passes
simplify(pass-1/5): share lexical row scoring— onescore_lexical_rowfor whole-term, fuzzy, phrase, proximity, and echo penalty. Callers only supply term frequency and BM25 inputs. Dropped the artifact scorer's never-failingResult.simplify(pass-2/5): share lexical candidate binding— onelexical_lane_candidate/lexical_lane_bindingfor projected chunks and artifact rows.simplify(pass-3/5): share byte n-gram packing— onepack_byte_ngramandpacked_query_ngramsfor the artifact builder and the in-memory postings.simplify(pass-4/5): collapse ranking score plumbing— diversity caps walk one counter array, missing metadata fills through one helper, tier scores usemin.simplify(pass-5/5): share digests and rank keys— cursor and composer parse batches share the digest loop; lexical and exact winner heaps share a key-onlyKeyedorder.Changes
crates/tracedecay-query/src/retrieval/lexical/projection.rsand the in-memory / artifact readers and postings.crates/tracedecay-temporal-query/src/ranking.rscrates/tracedecay-search-eval/src/controlled_workloads.rsTest plan
cargo test -p tracedecay-query --features search-eval --lib retrieval::lexical::— 117 passed, 0 failed, 1 ignoredcargo test -p tracedecay-temporal-query --lib ranking::— 16 passed, including diversity caps and bounded scorescargo test -p tracedecay-search-eval --lib controlled_workloads::— 7 passed, 1 ignoredcargo checkfortracedecay-query(search-eval + tests),tracedecay-temporal-query, andtracedecay-search-evalcargo nextest run --workspace --no-fail-fastnot runcargo clippynot runChecklist
CHANGELOG.mdupdated — not a user-facing contract change.envfiles included