Skip to content

Commit 4edee5e

Browse files
update comment
1 parent 243a88b commit 4edee5e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

backend/src/make_relationships.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ def create_source_chunk_entity_relationship(source_file_name :str,
6060
""",
6161
{"f_name":source_file_name,"chunk_id":current_chunk_id})
6262

63-
#FYI-Reason : To use list below because some relationship are not creating due to function running in thread
63+
#FYI-Reason: To use the list below because some relationships are not creating due to chunks not existing because the function running in a thread (chunks creation async)
6464
#relationship between chunks as NEXT_CHUNK, FIRST_CHUNK, these queries executed end of the file process.
65-
#could not change below query as parameterize because list only take single parameter and parameterize(2 parameter)
65+
#could not change the below query as parameterize because the list only takes a single parameter and parameterizes (2 parameters)
6666
if isFirstChunk:
6767
lst_cypher_queries_chunk_relationship.append('MATCH(d:Document {'+source_node.format(source_file_name)+'}) ,(c:Chunk {'+chunk_node_id_set.format(current_chunk_id)+'}) MERGE (d)-[:FIRST_CHUNK]->(c)')
6868
else:
@@ -71,7 +71,7 @@ def create_source_chunk_entity_relationship(source_file_name :str,
7171
# nodes_list = []
7272
for node in graph_document[0].nodes:
7373
node_id = node.id
74-
#Below query also unable to change as parametrize because we can't make parameter of Label or node type
74+
#Below query is also unable to change as parametrize because we can't make parameter of Label or node type
7575
#https://neo4j.com/docs/cypher-manual/current/syntax/parameters/
7676

7777
graph.query('MATCH(c:Chunk {'+chunk_node_id_set.format(current_chunk_id)+'}), (n:'+ node.type +'{ id: "'+node_id+'"}) MERGE (c)-[:HAS_ENTITY]->(n)')

0 commit comments

Comments
 (0)