I agree with Koen, for routing you should use shortestPath.
On Tue, Mar 25, 2014 at 10:38 AM, Koen Kleingeld <[email protected]>wrote: > and something like > > shortestPath((startNode)-[:CAR_MAIN_NODES_RELATION*]->(endNode)) > or allShortestPaths(startnode)-->(endnode)) > > > 2014-03-25 10:13 GMT+01:00 Antonio Grimaldi < > [email protected]>: > > i tried 1..4 and the query ends in 170ms. >> But obviously no path between two very distant locations is found ( this >> is the reason because i can't limit the number of nodes and edges). >> >> >> Il giorno martedì 25 marzo 2014 09:20:19 UTC+1, Antonio Grimaldi ha >> scritto: >>> >>> i tried to execute this cypher query : >>> >>> StringBuilder sb = new StringBuilder("START startNode = node(269604), >>> endNode = node(269605) >>> MATCH path=(startNode)-[:CAR_MAIN_NODES_RELATION*]->(endNode) >>> RETURN path AS shortestPath, reduce(cost=0, rel in relationships(path) | >>> cost + rel.edgeLength) AS totalCost >>> ORDER BY totalCost ASC >>> LIMIT 3") >>> >>> ResourceIterator<Object> pathsList = this.executionEngine.execute(sb. >>> toString()).columnAs("shortestPath"); >>> >>> but, after 10 minutes, I have not had any results yet... >>> >>> My graph had 157689 nodes and 1063621 edges. >>> >> -- >> 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. >> > > > > -- > Groeten / Best Regards, > > Koen > > -- > 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. > -- 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.
