Fix Community Operations with FalkorDB (#824)

* Update node_db_queries.py

* Update node_db_queries.py

* fix-community-operations

---------

Co-authored-by: Naseem Ali <34807727+Naseem77@users.noreply.github.com>
This commit is contained in:
Gal Shubeli 2025-08-18 17:38:24 +03:00 committed by GitHub
parent 50d385ce06
commit 1abb4b0fa3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View file

@ -111,7 +111,7 @@ def get_community_node_save_query(provider: GraphProvider) -> str:
if provider == GraphProvider.FALKORDB:
return """
MERGE (n:Community {uuid: $uuid})
SET n = {uuid: $uuid, name: $name, group_id: $group_id, summary: $summary, created_at: $created_at, name_embedding: $name_embedding}
SET n = {uuid: $uuid, name: $name, group_id: $group_id, summary: $summary, created_at: $created_at, name_embedding: vecf32($name_embedding)}
RETURN n.uuid AS uuid
"""
@ -131,3 +131,5 @@ COMMUNITY_NODE_RETURN = """
n.summary AS summary,
n.created_at AS created_at
"""

View file

@ -33,7 +33,8 @@ async def get_community_clusters(
if group_ids is None:
group_id_values, _, _ = await driver.execute_query(
"""
MATCH (n:Entity WHERE n.group_id IS NOT NULL)
MATCH (n:Entity)
WHERE n.group_id IS NOT NULL
RETURN
collect(DISTINCT n.group_id) AS group_ids
""",