Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-31-2021 03:01 AM
I am bulding recomemdation engine and in my model two nodes are connected to each other by multiple relationship of the same label. I want to pass to gds plugin only relationships that property date is bigger than some date that means it wont be all of them, but cypher projection helps to specyfy only source and target nodes and relationship type. Is there some solution to work around this or i need to remodel whole database??
05-31-2021 03:27 AM
Hi szergg,
The gds library allows for Native Projections and Cypher Projections. Using a cypher projection you can write your query with your specified conditions on the relationships and then define your source and target nodes.
Will this help solve your problem?
Thanks!
-Matt
05-31-2021 04:19 AM
So you are saying that in that cypher projection
CALL gds.graph.create.cypher(
'my-cypher-graph',
'MATCH (n) RETURN id(n) AS id',
'MATCH (n)-[r:MESSAGED]->(m) WHERE r.date>date('2020-05-31') RETURN id(n) AS source, id(m) AS target'
)
During processing only projecting relationship from last year and not older? Because relationship projection as source and targets takes nodes and my outputs of running algorithms are pretty much the same
05-31-2021 04:56 AM
I see. The algorithm is not giving you your expected results? Do you need only the last MESSAGED relationship between two nodes?
Thanks,
-Matt
All the sessions of the conference are now available online