Lucene sanitize (#423)

* lucene sanitize

* bump version
This commit is contained in:
Preston Rasmussen 2025-04-30 15:00:29 -04:00 committed by GitHub
parent c8232dd7dd
commit 50b3df03c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 7 deletions

View file

@ -341,10 +341,10 @@ async def node_fulltext_search(
query = ( query = (
""" """
CALL db.index.fulltext.queryNodes("node_name_and_summary", $query, {limit: $limit}) CALL db.index.fulltext.queryNodes("node_name_and_summary", $query, {limit: $limit})
YIELD node AS n, score YIELD node AS n, score
WHERE n:Entity WHERE n:Entity
""" """
+ filter_query + filter_query
+ ENTITY_NODE_RETURN + ENTITY_NODE_RETURN
+ """ + """
@ -709,10 +709,14 @@ async def get_relevant_nodes(
query, query,
query_params, query_params,
nodes=[ nodes=[
{'uuid': node.uuid, 'name': node.name, 'name_embedding': node.name_embedding} {
'uuid': node.uuid,
'name': lucene_sanitize(node.name),
'name_embedding': node.name_embedding,
}
for node in nodes for node in nodes
], ],
group_id=group_id, group_id=lucene_sanitize(group_id),
limit=limit, limit=limit,
min_score=min_score, min_score=min_score,
database_=DEFAULT_DATABASE, database_=DEFAULT_DATABASE,

View file

@ -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.11.0" version = "0.11.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" },