From c75ef82b662b1c79cd3c863263545465f3e3c39e Mon Sep 17 00:00:00 2001 From: Lukas Selch <122468280+da-luggas@users.noreply.github.com> Date: Fri, 24 Jan 2025 15:57:31 +0100 Subject: [PATCH] Fixed workspace matching in oracle_impl.py In the query for "node_degree", there was a typo that did not match the workspace of the edges, but only of the nodes. --- lightrag/kg/oracle_impl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightrag/kg/oracle_impl.py b/lightrag/kg/oracle_impl.py index e30b6909..f93d2816 100644 --- a/lightrag/kg/oracle_impl.py +++ b/lightrag/kg/oracle_impl.py @@ -769,7 +769,7 @@ SQL_TEMPLATES = { COLUMNS (e.source_name,e.target_name) )""", "node_degree": """SELECT count(1) as degree FROM GRAPH_TABLE (lightrag_graph MATCH (a)-[e]->(b) - WHERE a.workspace=:workspace and a.workspace=:workspace and b.workspace=:workspace + WHERE e.workspace=:workspace and a.workspace=:workspace and b.workspace=:workspace AND a.name=:node_id or b.name = :node_id COLUMNS (a.name))""", "get_node": """SELECT t1.name,t2.entity_type,t2.source_chunk_id as source_id,NVL(t2.description,'') AS description