{"record":{"id":"bc11d668341d3135","repo":"run-llama/llama_index","slug":"ref-doc-info-not-implemented-for-basemanagedindex","errorCode":null,"errorMessage":"ref_doc_info not implemented for BaseManagedIndex.","messagePattern":"ref_doc_info not implemented for BaseManagedIndex\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/indices/managed/base.py","lineNumber":83,"sourceCode":"    def as_retriever(self, **kwargs: Any) -> BaseRetriever:\n        \"\"\"Return a Retriever for this managed index.\"\"\"\n\n    def _build_index_from_nodes(\n        self, nodes: Sequence[BaseNode], **build_kwargs: Any\n    ) -> IndexDict:\n        \"\"\"Build the index from nodes.\"\"\"\n        raise NotImplementedError(\n            \"_build_index_from_nodes not implemented for BaseManagedIndex.\"\n        )\n\n    def _delete_node(self, node_id: str, **delete_kwargs: Any) -> None:\n        \"\"\"Delete a node.\"\"\"\n        raise NotImplementedError(\"_delete_node not implemented for BaseManagedIndex.\")\n\n    @property\n    def ref_doc_info(self) -> Dict[str, RefDocInfo]:\n        \"\"\"Retrieve a dict mapping of ingested documents and their nodes+metadata.\"\"\"\n        raise NotImplementedError(\"ref_doc_info not implemented for BaseManagedIndex.\")\n\n    @classmethod\n    def from_documents(\n        cls: Type[IndexType],\n        documents: Sequence[Document],\n        storage_context: Optional[StorageContext] = None,\n        show_progress: bool = False,\n        callback_manager: Optional[CallbackManager] = None,\n        transformations: Optional[List[TransformComponent]] = None,\n        **kwargs: Any,\n    ) -> IndexType:\n        \"\"\"Build an index from a sequence of documents.\"\"\"\n        raise NotImplementedError(\n            \"from_documents not implemented for BaseManagedIndex.\"\n        )\n","sourceCodeStart":65,"sourceCodeEnd":99,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/indices/managed/base.py#L65-L99","documentation":"ref_doc_info reports which source documents were ingested and their node mappings — state that lives in the external service for a managed index, not locally. BaseManagedIndex therefore implements the ref_doc_info property as a NotImplementedError stub, so merely reading it raises.","triggerScenarios":"Accessing managed_index.ref_doc_info (a property — no call needed); admin tooling that lists ingested docs per index across a registry; sync scripts diffing ref_doc_info against external sources.","commonSituations":"Dashboards/audit tooling written against local indices and later pointed at a managed one; compliance features that enumerate ingested documents; forgetting that managed indices externalize all state.","solutions":["Query the external service directly (its client/API) for ingested-document information instead of ref_doc_info.","Maintain your own document registry (DB table) at ingestion time when you need this metadata for managed indices.","Wrap access in try/except NotImplementedError for registries mixing local and managed index types."],"exampleFix":"# before\ninfo = managed_index.ref_doc_info  # raises\n\n# after\ninfo = my_doc_registry.list_docs(managed_index.index_id)  # track externally","handlingStrategy":"try-catch","validationCode":"from llama_index.core.indices.managed import BaseManagedIndex\n\nif isinstance(index, BaseManagedIndex):\n    info = doc_registry.list_docs(index.index_id)  # external tracking\nelse:\n    info = index.ref_doc_info","typeGuard":"from llama_index.core.indices.managed import BaseManagedIndex\n\ndef has_local_ref_doc_info(index: object) -> bool:\n    return not isinstance(index, BaseManagedIndex)","tryCatchPattern":"try:\n    info = index.ref_doc_info\nexcept NotImplementedError:\n    info = {}  # managed index: query the external service instead","preventionTips":["Maintain your own document registry at ingest time for managed indices.","Access ref_doc_info via helpers that understand the local/managed split.","Note it is a property: guard the attribute access itself."],"tags":["llama-index","managed-index","not-implemented","property","metadata"],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}