On 04/28/2016 03:32 PM, Alan Robertson wrote: > The query isn't quite right. It has an error in it (variable n already > used) and something about the order of operations causes it to return > more than one row - with duplicates ;-) > > But this one seems to do the trick: > |match path = shortestPath( (n)-[*]->(m) ) return collect(distinct > unwind(nodes(path))), collect(distinct unwind(rels(path)))| That query is quite fast -- but...
I don't actually want /only/ the shortest paths, I want all the paths that involve those relationships. But if I delete the shortestPath() function call it runs so long I get an HTTP timeout on many of these queries. I restrict the types of relationships with [:rel1type|:rel2type|:etctype*]. And even though the result only includes one or two additional paths, it runs like 100 times slower - and often just times out via REST (via Py2neo). That's really disappointing. Does anyone have a suggestion on how to make this faster - or at least not time out? -- Alan Robertson / CTO [email protected] <mailto:[email protected]>/ +1 303.947.7999 Assimilation Systems Limited http://AssimilationSystems.com Twitter <https://twitter.com/ossalanr> Linkedin <https://www.linkedin.com/in/alanr> skype <https://htmlsig.com/skype?username=alanr_unix.sh> -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
