Neo4j: Split string and get position
问题 I need to split a field in different values and store each value in a different node. For each created node I want to store the position. Example: Sentence Words My car is red My;car;is;red Using: FOREACH (w IN SPLIT(line.TWords, ";") | MERGE (wd:Word {word: w}) I can split the field and store the different words, but I'd like to store the position on the relationship. My car is red -[HAS_WORD {position:1}]-> My My car is red -[HAS_WORD {position:2}]-> car My car is red -[HAS_WORD {position:3