neo4j - Get subpath when there is connection between concrete node and each node in subpath -


i have events ordered in chain according dates. see example. want subpaths have happend on specific date. lets date known. have written this:

start d=node(73)  // date node match node=d-[:when]->(l)<-[:follows*0..]-(f)<-[:when]-d return f,l; 

and seems work more or less ok. have 2 issues:

  • it returns 2 items result. there little issues parsing. can unite 2 values whole path?
  • i'm not sure order. can possible 1st element in sequence l last element in path?

i think easier construct paths if know last element in subpath find. posible last element belongs date (it means last element should belong date , next him should absent or belong date) ?

update: have found way merge values collenction:

start d=node(74)  match node=d-[:when]->(l)<-[:follows*0..]-(f)<-[:when]-d [ f,l ] qwe  return qwe; 

if interested in path can do:

start d=node(73)  // date node match (d)-[:when]->(l),(d)-[:when]->(f),        path=(l)<-[:follows*0..]-(f) return path;  or   return nodes(path) 

regarding order, provide direction, order nodes ordered in path.


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -