cypher - Iterate through Neo4j relationships and return the minimum value of relationships properties -
cypher - Iterate through Neo4j relationships and return the minimum value of relationships properties -
i want iterate through relationships between "begining node" , "end node". indeed, there cypher request :
match (ar1:article)-[:part_of]->()-[:series]->(s1), (ar2:article)-[:part_of]->()-[:series]->(s2), (ar1)-[:creator]->(au1:author), (ar2)-[:creator]->(au1:author), p1 = (au1)-[contributor*]->(au2:author) cut down (edge in relationships(p1)|weight + 1/edge.fdegree) strength_au1_au2_p1,ar1 ar1,s1 s1,ar2 ar2,s2 s2,au1 au1,au2 au2 s1.name='www' , s2.name='pods' , ar2.year >2010.0 , ar1.year >2010.0 , strength_au1_au2_p1<5.0 homecoming ar1,s1,ar2,s2,au1,au2,ar1.year calc_fuzzy_ar1_year_recent,ar2.year calc_fuzzy_ar2_year_recent,strength_au1_au2_p1 calc_fuzzy_length_p1_short**
now want iterate through contributor* relationships (in p1) , each of 'fdegree' , homecoming minimum value(fdegree) of relationships in p1.
thank all
try this:
match (au1:author)<-[:creator]-(ar1:article)-[:part_of]->()-[:series]->(s1), (au2:author)<-[:creator]-(ar2:article)-[:part_of]->()-[:series]->(s2) s1.name='www' , s2.name='pods' , ar2.year >2010.0 , ar1.year >2010.0 au1,au2,ar1,ar2,s1,s2 match (au1)-[rels:contributor*]->(au2:author) cut down (weight = 0, border in rels | weight + 1/edge.fdegree) < 5.0 homecoming au1,au2,ar1,ar2,s1,s2, cut down (weight = 1000000, border in rels | case when weight < edge.fdegree weight else edge.fdegree end) min_degree
neo4j cypher
Comments
Post a Comment