File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ def _get_search_index_query(
137137 "CALL db.idx.vector.queryNodes($entity_label, "
138138 "$entity_property, $k, vecf32($embedding)) "
139139 "YIELD node, score "
140+ "WITH node, (2 - score) / 2 AS score "
140141 )
141142 elif search_type == SearchType .HYBRID :
142143 return (
@@ -1245,8 +1246,8 @@ def from_existing_graph(
12451246 f"MATCH (n:`{ node_label } `) "
12461247 f"WHERE n.`{ embedding_node_property } ` IS null "
12471248 "AND any(k IN $props WHERE n[k] IS NOT null) "
1248- "RETURN id(n) AS id, "
1249- "coalesce(n.text , '') AS text "
1249+ "RETURN id(n) AS id, reduce(str='', "
1250+ "k IN $props | str + ' \\ n' + k + ':' + coalesce(n[k] , '') ) AS text "
12501251 "LIMIT 1000"
12511252 )
12521253 data = store ._query (fetch_query , params = {"props" : text_node_properties })
You can’t perform that action at this time.
0 commit comments