WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 86f64aa

Browse files
authored
Merge pull request #1 from motey/master
Make fragger kind of idempotent
2 parents 4c13f0f + a42a913 commit 86f64aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def create_query_fragments_for_node(label, text_property):
3030
log.debug("Create qeuery for label {}, text property {}".format(label, text_property))
3131

3232
q = """CALL apoc.periodic.iterate(
33-
\"MATCH (text_node:{0}) WHERE NOT text_node:CollectionHub RETURN text_node\",
33+
\"MATCH (text_node:{0}) WHERE NOT text_node:CollectionHub AND NOT (text_node)-[:HAS_FRAGMENT]-() RETURN text_node\",
3434
\"WITH text_node,split(text_node.{1}, '. ') AS frags
3535
WHERE size(frags) > 0
3636
WITH text_node,frags,range(0,size(frags)-1) AS r

0 commit comments

Comments
 (0)