Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
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