What if I would like to get all shortest paths with the lowest cost without 
knowing how much this could be. I think by adding the query rel.cost < x 
will not work in this case?

Op dinsdag 17 mei 2016 22:23:37 UTC+2 schreef Michael Hunger:
>
> Just add a WHERE clause (at least in Neo4j 3.x) 
>
> WHERE ALL( rel in rels(path) WHERE rel.cost > 10) 
>
> > Am 17.05.2016 um 15:19 schrieb Johan Kumps <johan...@gmail.com 
> <javascript:>>: 
> > 
> > Hi, 
> > 
> > I'm currently calculating the shortest paths between 2 nodes via the 
> SEM_SIM relationship using the following query: 
> > 
> > @Query("MATCH (s:StartVertex {uuid:{0}}) , " 
> >                                 + "(g:GoalVertex {uuid:{1}}) , " 
> >                                 + "path = 
> shortestpath((s)-[:SEM_SIM*]-(g)) " 
> >                                 + "RETURN path ORDER BY LENGTH(path) 
> DESC LIMIT 1") 
> > 
> > All this is working fine but I would like to be able to take a 
> relationship attribute like cost into account. How can I use this attribute 
> in the above query? 
> > 
> > Thanks in advance for the information 
> > 
> > Kind regards, 
> > Johan, 
> > 
> > 
> > 
> > 
> > -- 
> > 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 neo4j+un...@googlegroups.com <javascript:>. 
> > 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 neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to