Sorry,I made a misstake on the first part of my aql. if i just use an "any" direction,the set of results will be bigger than that i need.
<https://lh3.googleusercontent.com/-Zf4ycDgNqVM/V7_svc65mgI/AAAAAAAAAAc/4GZ5kUoJINMi_OwjBSHy75oeMXXPYMC-ACLcB/s1600/123.png> 在 2016年8月26日星期五 UTC+8下午3:04:03,Jan写道: > > Hi, > > I have tried the query and got some parse errors in the part before the > traversal. > I think the first part should read > > FOR sv IN subject FILTER sv.name == "C3" > > (filtering on "sv" and not "v", and using a double equal sign to make the > expression a comparison and not an assignment). > > Apart from that, the traversal part specifies "sv" as the edge collection > and "any" as the traversal direction. Then it specifies "r_parent" for > outbound traversal and "r_parent" again for inbound traversal. > Though the combination of the "inbound" and "outbound" directions is the > same as "any", I think the traversal part can be simplified to just > > FOR v,e,p IN 2 ANY sv r_parent RETURN p > > The query parser just checks for whether multiple directions are specified > for the same collection and will report an error if this is so. > > Best regards > Jan > > Am Freitag, 26. August 2016 08:53:40 UTC+2 schrieb Beansprouts: >> >> >> <https://lh3.googleusercontent.com/-614Soa26kRI/V7_jusf7VJI/AAAAAAAAAAM/PVmoJfFy7F48NOb-u-fVGNQ1hwX9MTxngCLcB/s1600/123.png> >> >> This is a small part of my graph,every vertex may has a parent and >> children. >> >> my case : we have a start vertex,then we need to find other verties have >> the same parent with the start vertex. >> >> In old version,we can do this by an aql: for sv in subject filter >> v.name="C3" >> for v,e,p in 2 any sv outbound r_parent,inbound r_parent return p >> >> But,in version 3.0.4 the same aql cannot work as before,just got a >> exception message "conflicting directions specified for collection". >> >> It's a new feature! >> >> But,I think it's an bug. >> >> -- You received this message because you are subscribed to the Google Groups "ArangoDB" 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.
