fix: include annotations, http route, package, and name in BM25 text - #97
Merged
Conversation
chunk_tier's sparse (BM25) text only covered signature/docstring/source, so keyword searches for annotation names or route strings had no sparse matches even though those fields are indexed in the payload and dense embedding text. Closes #77 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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
_build_bm25_textinserver/indexer/pipeline.pyonly used signature + docstring + source, so the sparse index had no coverage for annotations (e.g.@RestController), HTTP routes, package/module, or the symbol name — even though those fields are present in the payload and in the dense embedding text.@-normalized annotations, and HTTP method+route into the sparse text, mirroring how_build_embedding_textalready reads those fields.docs/ingestion.mdanddocs/sparse-vectors.md, which documented the old gap explicitly.Test plan
uv run pytest tests/test_pipeline.py -q— addedtest_bm25_text_includes_name_package_annotations_and_http_routeandtest_bm25_text_annotation_already_prefixed_not_double_prefixeduv run pytest -q— 267 passedruff format/ruff checkcleanCloses #77
🤖 Generated with Claude Code