Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / method
_dense_unavailable_reason
codeintel.retrieval.Retriever._dense_unavailable_reason
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 |
|---|---|---|
| _filter_clauses | retrieval.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| search | retrieval.py | same file |
| Symbol | File | Resolved by |
|---|---|---|
| Retriever | retrieval.py | same file |
codeintel.retrieval.Retriever._dense_unavailable_reasonbackend/app/codeintel/retrieval.py, lines 281–301Open source
def _dense_unavailable_reason(self, filters: Filters) -> str | None: if self.embedder is None: return "no embedding backend configured (EMBEDDING_BACKEND=none)" stmt = select(DocumentChunk.id).where( DocumentChunk.embedding_model == self.embedder.model_id, *self._filter_clauses(filters), ).limit(1) if self.db.execute(stmt).first() is not None: return None models = self.db.execute( select(DocumentChunk.embedding_model) .where(DocumentChunk.embedding_model.isnot(None), *self._filter_clauses(filters)) .distinct() .limit(5) ).scalars().all() if models: return ( f"index was embedded with {sorted(models)}, query embedder is " f"{self.embedder.model_id!r}; re-index with the same EMBEDDING_BACKEND" ) return "no chunk embeddings in the index"What the index recorded
- Signature
def _dense_unavailable_reason(self, filters: Filters) -> str | None:- File
backend/app/codeintel/retrieval.py- Lines
- 281–301
- Parser
- python-ast
- Git blob
884729a39ae0b3d340ad83f75946677dcddf3791- Call sites
- 11 named, 3 resolved, 8 left unlinked
- Outside this subset
- 2 more edges reach code outside the graph shown here
