{"record":{"id":"aa7ff82a678d40f0","repo":"run-llama/llama_index","slug":"simplevectorstore-does-not-store-nodes-directly","errorCode":null,"errorMessage":"SimpleVectorStore does not store nodes directly.","messagePattern":"SimpleVectorStore does not store nodes directly\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/vector_stores/simple.py","lineNumber":172,"sourceCode":"        \"\"\"Get client.\"\"\"\n        return\n\n    @property\n    def _data(self) -> SimpleVectorStoreData:\n        \"\"\"Backwards compatibility.\"\"\"\n        return self.data\n\n    def get(self, text_id: str) -> List[float]:\n        \"\"\"Get embedding.\"\"\"\n        return self.data.embedding_dict[text_id]\n\n    def get_nodes(\n        self,\n        node_ids: Optional[List[str]] = None,\n        filters: Optional[MetadataFilters] = None,\n    ) -> List[BaseNode]:\n        \"\"\"Get nodes.\"\"\"\n        raise NotImplementedError(\"SimpleVectorStore does not store nodes directly.\")\n\n    def add(\n        self,\n        nodes: Sequence[BaseNode],\n        **add_kwargs: Any,\n    ) -> List[str]:\n        \"\"\"Add nodes to index.\"\"\"\n        for node in nodes:\n            self.data.embedding_dict[node.node_id] = node.get_embedding()\n            self.data.text_id_to_ref_doc_id[node.node_id] = node.ref_doc_id or \"None\"\n\n            metadata = node_to_metadata_dict(\n                node, remove_text=True, flat_metadata=False\n            )\n            metadata.pop(\"_node_content\", None)\n            self.data.metadata_dict[node.node_id] = metadata\n        return [node.node_id for node in nodes]\n","sourceCodeStart":154,"sourceCodeEnd":190,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/vector_stores/simple.py#L154-L190","documentation":"SimpleVectorStore is a minimal in-memory vector store that only keeps embedding vectors plus a couple of lookup dicts — it never stores the full BaseNode objects. Its `get_nodes()` therefore deliberately raises NotImplementedError rather than returning wrong or empty results. Retrieving source nodes requires a store that persists documents (docstore) or a full-featured vector store integration.","triggerScenarios":"Calling `vector_store.get_nodes(node_ids=[...])` or `get_nodes(filters=...)` on a `SimpleVectorStore` instance (the default store used by `VectorStoreIndex` without an external DB), e.g. to rehydrate nodes for citation or re-ranking.","commonSituations":"Prototypes built on the default in-memory index that later call node-retrieval APIs; code ported from Chroma/Qdrant/Weaviate integrations (which implement get_nodes) down to the simple store; calling `aget_nodes()` which delegates to the sync version and raises the same error.","solutions":["Use the docstore instead: `index.docstore.get_nodes(node_ids)` — VectorStoreIndex keeps nodes there by default.","Switch to a vector store integration that stores documents (Chroma, Qdrant, Weaviate, etc.) if you need node retrieval from the store itself.","Catch NotImplementedError and degrade gracefully if you support multiple backends."],"exampleFix":"# before\nnodes = simple_store.get_nodes(node_ids=[\"id1\"])  # NotImplementedError\n\n# after\nnodes = index.docstore.get_nodes([\"id1\"])  # nodes live in the docstore","handlingStrategy":"fallback","validationCode":"from llama_index.core.vector_stores import SimpleVectorStore\n\ndef store_supports_get_nodes(store) -> bool:\n    return type(store).get_nodes is not SimpleVectorStore.get_nodes","typeGuard":null,"tryCatchPattern":"try:\n    nodes = store.get_nodes(node_ids=ids)\nexcept NotImplementedError:\n    nodes = index.docstore.get_nodes(ids) or []  # fallback source of truth","preventionTips":["Prefer index.docstore for node retrieval; treat the vector store as embeddings-only.","If you support multiple backends, gate get_nodes on a capability check.","Keep node ids in your own metadata if you need rehydration without a docstore."],"tags":["vector-store","not-implemented","simple-vector-store","python"],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}