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:
parent
50d385ce06
commit
1abb4b0fa3
2 changed files with 6 additions and 3 deletions
|
|
@ -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
|
||||
"""
|
||||
|
||||
|
|
@ -130,4 +130,6 @@ COMMUNITY_NODE_RETURN = """
|
|||
n.group_id AS group_id,
|
||||
n.summary AS summary,
|
||||
n.created_at AS created_at
|
||||
"""
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
""",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue