parent
9cc2e86071
commit
97593550a9
2 changed files with 12 additions and 12 deletions
|
|
@ -63,7 +63,7 @@ MAX_QUERY_LENGTH = 32
|
||||||
|
|
||||||
def fulltext_query(query: str, group_ids: list[str] | None = None):
|
def fulltext_query(query: str, group_ids: list[str] | None = None):
|
||||||
group_ids_filter_list = (
|
group_ids_filter_list = (
|
||||||
[f"group_id-'{lucene_sanitize(g)}'" for g in group_ids] if group_ids is not None else []
|
[f'group_id:"{lucene_sanitize(g)}"' for g in group_ids] if group_ids is not None else []
|
||||||
)
|
)
|
||||||
group_ids_filter = ''
|
group_ids_filter = ''
|
||||||
for f in group_ids_filter_list:
|
for f in group_ids_filter_list:
|
||||||
|
|
@ -301,12 +301,12 @@ async def edge_bfs_search(
|
||||||
|
|
||||||
query = (
|
query = (
|
||||||
"""
|
"""
|
||||||
UNWIND $bfs_origin_node_uuids AS origin_uuid
|
UNWIND $bfs_origin_node_uuids AS origin_uuid
|
||||||
MATCH path = (origin:Entity|Episodic {uuid: origin_uuid})-[:RELATES_TO|MENTIONS]->{1,3}(n:Entity)
|
MATCH path = (origin:Entity|Episodic {uuid: origin_uuid})-[:RELATES_TO|MENTIONS]->{1,3}(n:Entity)
|
||||||
UNWIND relationships(path) AS rel
|
UNWIND relationships(path) AS rel
|
||||||
MATCH (n:Entity)-[r:RELATES_TO]-(m:Entity)
|
MATCH (n:Entity)-[r:RELATES_TO]-(m:Entity)
|
||||||
WHERE r.uuid = rel.uuid
|
WHERE r.uuid = rel.uuid
|
||||||
"""
|
"""
|
||||||
+ filter_query
|
+ filter_query
|
||||||
+ """
|
+ """
|
||||||
RETURN DISTINCT
|
RETURN DISTINCT
|
||||||
|
|
@ -455,10 +455,10 @@ async def node_bfs_search(
|
||||||
|
|
||||||
query = (
|
query = (
|
||||||
"""
|
"""
|
||||||
UNWIND $bfs_origin_node_uuids AS origin_uuid
|
UNWIND $bfs_origin_node_uuids AS origin_uuid
|
||||||
MATCH (origin:Entity|Episodic {uuid: origin_uuid})-[:RELATES_TO|MENTIONS]->{1,3}(n:Entity)
|
MATCH (origin:Entity|Episodic {uuid: origin_uuid})-[:RELATES_TO|MENTIONS]->{1,3}(n:Entity)
|
||||||
WHERE n.group_id = origin.group_id
|
WHERE n.group_id = origin.group_id
|
||||||
"""
|
"""
|
||||||
+ filter_query
|
+ filter_query
|
||||||
+ ENTITY_NODE_RETURN
|
+ ENTITY_NODE_RETURN
|
||||||
+ """
|
+ """
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[project]
|
[project]
|
||||||
name = "graphiti-core"
|
name = "graphiti-core"
|
||||||
description = "A temporal graph building library"
|
description = "A temporal graph building library"
|
||||||
version = "0.13.0"
|
version = "0.13.1"
|
||||||
authors = [
|
authors = [
|
||||||
{ "name" = "Paul Paliychuk", "email" = "paul@getzep.com" },
|
{ "name" = "Paul Paliychuk", "email" = "paul@getzep.com" },
|
||||||
{ "name" = "Preston Rasmussen", "email" = "preston@getzep.com" },
|
{ "name" = "Preston Rasmussen", "email" = "preston@getzep.com" },
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue