{"record":{"id":"cbce2ae33f59655c","repo":"run-llama/llama_index","slug":"vector-query-not-implemented-for-simplepropertygra","errorCode":null,"errorMessage":"Vector query not implemented for SimplePropertyGraphStore.","messagePattern":"Vector query not implemented for SimplePropertyGraphStore\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/graph_stores/simple_labelled.py","lineNumber":251,"sourceCode":"    def get_schema(self, refresh: bool = False) -> str:\n        \"\"\"Get the schema of the graph store.\"\"\"\n        raise NotImplementedError(\n            \"Schema not implemented for SimplePropertyGraphStore.\"\n        )\n\n    def structured_query(\n        self, query: str, param_map: Optional[Dict[str, Any]] = None\n    ) -> Any:\n        \"\"\"Query the graph store with statement and parameters.\"\"\"\n        raise NotImplementedError(\n            \"Structured query not implemented for SimplePropertyGraphStore.\"\n        )\n\n    def vector_query(\n        self, query: VectorStoreQuery, **kwargs: Any\n    ) -> Tuple[List[LabelledNode], List[float]]:\n        \"\"\"Query the graph store with a vector store query.\"\"\"\n        raise NotImplementedError(\n            \"Vector query not implemented for SimplePropertyGraphStore.\"\n        )\n\n    @property\n    def client(self) -> Any:\n        \"\"\"Get client.\"\"\"\n        raise NotImplementedError(\n            \"Client not implemented for SimplePropertyGraphStore.\"\n        )\n\n    def save_networkx_graph(self, name: str = \"kg.html\") -> None:\n        \"\"\"Display the graph store, useful for debugging.\"\"\"\n        import networkx as nx\n\n        G = nx.DiGraph()\n        for node in self.graph.nodes.values():\n            G.add_node(node.id, label=node.id)\n        for triplet in self.graph.triplets:","sourceCodeStart":233,"sourceCodeEnd":269,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/graph_stores/simple_labelled.py#L233-L269","documentation":"SimplePropertyGraphStore is the default in-memory property graph store in llama-index-core. It keeps nodes and triplets in Python dicts/networkx but performs no embedding computation, so the vector_query interface required by PropertyGraphStore subclasses is intentionally left unimplemented. Calling vector_query (directly or via a retriever that needs similarity search over graph nodes) raises NotImplementedError.","triggerScenarios":"Calling simple_store.vector_query(query) directly; using PropertyGraphIndex with a retriever that falls back to node-level vector search (e.g. VectorContextRetriever or synth queries) while the graph store is the default SimplePropertyGraphStore; any code path that assumes every PropertyGraphStore supports vector queries.","commonSituations":"Building a PropertyGraphIndex without specifying graph_store and then attempting vector/similarity retrieval over graph nodes; writing store-agnostic code against PropertyGraphStore and testing only against a real backend (Neo4j, Kuzu, FalkorDB) before running against the simple store.","solutions":["Switch to a graph store that supports vector queries, e.g. Neo4jPropertyGraphStore, KuzuPropertyGraphStore, or FalkorDBPropertyGraphStore, passed via PropertyGraphIndex(..., graph_store=store).","Avoid vector retrieval over graph nodes with the simple store; rely on text/keyword-based retrieval (e.g. LLMSynonymRetriever or default text-to-cypher paths that don't need vector_query).","Subclass SimplePropertyGraphStore and implement vector_query yourself (e.g. by embedding node text with Settings.embed_model and ranking with numpy) if you must stay in-memory.","Persist the graph and reload it into a real backend: simple_store.save_networkx_graph / persist, then construct the external store and use it."],"exampleFix":"# before\nindex = PropertyGraphIndex.from_documents(docs)  # defaults to SimplePropertyGraphStore\nnodes, scores = index.property_graph_store.vector_query(query)  # NotImplementedError\n\n# after\nfrom llama_index.graph_stores.neo4j import Neo4jPropertyGraphStore\ngraph_store = Neo4jPropertyGraphStore(username, password, url)\nindex = PropertyGraphIndex.from_documents(docs, property_graph_store=graph_store)\nnodes, scores = graph_store.vector_query(query)","handlingStrategy":"type-guard","validationCode":"from llama_index.core.graph_stores import SimplePropertyGraphStore\nstore = index.property_graph_store\nsupports_vector = not isinstance(store, SimplePropertyGraphStore)","typeGuard":"def supports_vector_query(store) -> bool:\n    return type(store).vector_query is not SimplePropertyGraphStore.vector_query","tryCatchPattern":"try:\n    nodes, scores = store.vector_query(q)\nexcept NotImplementedError:\n    nodes, scores = [], []  # fall back to text-based graph retrieval","preventionTips":["Pass an explicit property_graph_store when constructing PropertyGraphIndex instead of relying on the in-memory default.","Feature-detect store capabilities before calling optional interfaces like vector_query."],"tags":["graph-store","vector-query","not-implemented","property-graph"],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}