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 = (
"""
CALL db.index.fulltext.queryNodes("node_name_and_summary", $query, {limit: $limit})
YIELD node AS n, score
WHERE n:Entity
"""
CALL db.index.fulltext.queryNodes("node_name_and_summary", $query, {limit: $limit})
YIELD node AS n, score
WHERE n:Entity
"""
+ filter_query
+ ENTITY_NODE_RETURN
+ """
@ -709,10 +709,14 @@ async def get_relevant_nodes(
query,
query_params,
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
],
group_id=group_id,
group_id=lucene_sanitize(group_id),
limit=limit,
min_score=min_score,
database_=DEFAULT_DATABASE,

View File

@ -1,7 +1,7 @@
[project]
name = "graphiti-core"
description = "A temporal graph building library"
version = "0.11.0"
version = "0.11.1"
authors = [
{ "name" = "Paul Paliychuk", "email" = "paul@getzep.com" },
{ "name" = "Preston Rasmussen", "email" = "preston@getzep.com" },