Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / method
_symbol_boost
codeintel.retrieval.Retriever._symbol_boost
PINNED SOURCE Source and edges from the index at this commit. An execution appears only where one was recorded.
PHAROS at 975a38dMIT license
Around this symbol
Search all symbolsLoading
| Symbol | File | Resolved by |
|---|---|---|
| compound_name | retrieval.py | same file |
| symbol_like_terms | retrieval.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| _fuse | retrieval.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| Retriever | retrieval.py | same file |
codeintel.retrieval.Retriever._symbol_boostbackend/app/codeintel/retrieval.py, lines 446–463Open source
def _symbol_boost(self, hits: dict[str, Hit], terms: list[str], query: str, hints: list[str] | None = None) -> None: compounds = symbol_like_terms(query) # A hint is a guessed name even when written in plain words ("parse url"). compounds |= {compound_name(part) for h in hints or [] for part in h.split(".") if compound_name(part)} if not compounds: return rows = self.db.execute( select(DocumentChunk.id, DocumentChunk.chunk_metadata).where( DocumentChunk.id.in_([uuid.UUID(c) for c in hits]) ) ).all() for cid, meta in rows: name = (meta or {}).get("name") or "" if name and compound_name(name) in compounds: h = hits[str(cid)] h.score += 1.0 / (RRF_K + 1) h.evidence.boosts.append("exact_symbol_name")What the index recorded
- Signature
def _symbol_boost(self, hits: dict[str, Hit], terms: list[str], query: str, hints: list[str] | None) -> None:- File
backend/app/codeintel/retrieval.py- Lines
- 446–463
- Parser
- python-ast
- Git blob
884729a39ae0b3d340ad83f75946677dcddf3791- Call sites
- 12 named, 4 resolved, 8 left unlinked
- Outside this subset
- 2 more edges reach code outside the graph shown here
