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??
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?
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
I see. The algorithm is not giving you your expected results? Do you need only the last MESSAGED relationship between two nodes?