Head's Up! Site migration is underway. Phase 2: migrate recent content
β02-14-2022 08:24 AM
Hello,
I have this situation:
a series of nodes that contains a property text
with strings like:
"California's change directly affects many of these companies, and more states are likely to soon follow"
then I have nodes for locations, thus I have one with id
=California
I'd like to connect all nodes that contains "California" in their text with the node "California", but I am at a loss on how to handle the string search in Cypher...
Where should I look for pointers in the doc?
Solved! Go to Solution.
β02-14-2022 10:24 AM
What about this one?
MATCH (n:Node)
WHERE n.text CONTAINS βCaliforniaβ
MATCH (l:Location)
WHERE l.id = βCalifornaβ
MERGE (n)-[CONTAINS]->(l)
β02-14-2022 10:24 AM
What about this one?
MATCH (n:Node)
WHERE n.text CONTAINS βCaliforniaβ
MATCH (l:Location)
WHERE l.id = βCalifornaβ
MERGE (n)-[CONTAINS]->(l)
β02-15-2022 02:23 AM
Hi @simone
You can always adjust your string search according to your preferences with a regex base search. It's supported by Neo4J.
Bennu
All the sessions of the conference are now available online