fulltext query update
This commit is contained in:
parent
38dd3e8dc3
commit
c0cae61d52
3 changed files with 13 additions and 13 deletions
|
|
@ -62,7 +62,7 @@ MAX_QUERY_LENGTH = 128
|
||||||
|
|
||||||
def fulltext_query(query: str, group_ids: list[str] | None = None, fulltext_syntax: str = ''):
|
def fulltext_query(query: str, group_ids: list[str] | None = None, fulltext_syntax: str = ''):
|
||||||
group_ids_filter_list = (
|
group_ids_filter_list = (
|
||||||
[fulltext_syntax + f"group_id:'{lucene_sanitize(g)}'" for g in group_ids]
|
[fulltext_syntax + f'group_id:"{lucene_sanitize(g)}"' for g in group_ids]
|
||||||
if group_ids is not None
|
if group_ids is not None
|
||||||
else []
|
else []
|
||||||
)
|
)
|
||||||
|
|
@ -295,12 +295,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
|
||||||
|
|
@ -443,10 +443,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.17.9"
|
version = "0.17.10"
|
||||||
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" },
|
||||||
|
|
|
||||||
2
uv.lock
generated
2
uv.lock
generated
|
|
@ -746,7 +746,7 @@ wheels = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "graphiti-core"
|
name = "graphiti-core"
|
||||||
version = "0.17.9"
|
version = "0.17.10"
|
||||||
source = { editable = "." }
|
source = { editable = "." }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "diskcache" },
|
{ name = "diskcache" },
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue