relationship - Is it possible to get two different relation times between two nodes? -


i new neo4j & playing learn in deep. have small doubt like,

if created 2 nodes in space , provided relationship , system time (to know @ time friends each other) between 2 nodes.

so question is, possible 2 different relation times (if provide direction both & created relation once)?

you people knows how traverse function behaves in neo4j.

if please explain me example how ?

your question not entirely clear.

if have

(person) - knows [started = time] -> (person) 

then can have many of relationships you'd like, in either direction (both means 2 relationship, 1 in either direction).

for direct relationships do:

node me, you;  (relationship r : me.getrelationships(knows)) {    if (r.getothernode(me).equals(you)) result.add(r.getproperty("time")); } 

for longer paths can use graphalgofactory.allsimplepaths retrieve paths between 2 people , relationships , time information whatever want.

hth

michael


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -