Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
04-20-2020 03:27 AM
I'm developing an article recommendation system. When a user read article1, article2, ..., and articlen, the system recommend next articles.
I want to do something like the following:
MATCH (a:Article)
WHERE {for all x such that (x:Article)-[:next]->(a:Article), x.read=true}
RETURN a
How do I write this?
04-20-2020 09:49 AM
Hi Kobayashi,
You can use Optional Match
match(a:Article)
optional match (x:Article)-[:next]->(a:Article) set x.read=TRUE return x
04-20-2020 10:55 AM
This query is going to set read = true flag for all users. You need to select the articles read by a user and set the flag to true for that user.
All the sessions of the conference are now available online