[arangodb-google] Re: Graph traversal and subgraphs
Hi, no problem - yes, got it. Its currently being worked on. We hope to have it available as part of the next release - but you never know. Currently the traverser can only stop on direct path FILTER expressions. Not a native speaker as well, no problem ;-) Cheers, Willi On Thursday, July 14, 2016 at 3:06:43 PM UTC+2, Roman wrote: > > I send you dump. Hmm my bad english :), when I read Arango 3.0 I thought > it's already there. Any idea when you will add it? It's quite important > feature for us. Currently there's no other way how to do it? > -- 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 arangodb+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[arangodb-google] Re: Graph traversal and subgraphs
Hi, Can you gist or pastebin a dump of your example graph so that I can have a closer look at it myselves? Cheers, Willi -- 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 arangodb+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[arangodb-google] Re: Graph traversal and subgraphs
If I looked to documentation https://docs.arangodb.com/3.0/AQL/Graphs/Traversals.html there should be something like this Traversals on graphs: Id Depth Vertex collections Edge collections Filter conditions 2 1..3circles edges `Path`.`edges`[0] -> v.`label` == "right_foo" But in my explain it's not: Traversals on graphs: Id Depth Vertex collections Edge collections Filter conditions 5 1..1 vDevice eLink -- 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 arangodb+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[arangodb-google] Re: Graph traversal and subgraphs
Hi Roman, FILTERs are currently only pushed into the traversal engine when you filter simple conditions on the path; Filtering on v & e are not intended to abort traversals. With ArangoDB 3.0 we introduced ANY and ALL in that context: FILTER p.edges[*].type ALL == "cdp" which will do what you want. However, performance wise it will gain the ability to abort traversals in future ArangoDB releases. In general you can use db._explain() to inspect the generated plan; If the FOR statement has a copy of the FILTER statements (or parts of it) they're executed inside of the traversal instead of on the result set of the traversal. Cheers, Willi On Thursday, July 14, 2016 at 9:16:53 AM UTC+2, Roman wrote: > > Hi, I have graph (see attachment for example) with edges which have > property type. I want to traverse graph, but use only specific edges (for > example type == "cdp"). I tried following query: > > for d in vDevice filter d.hostname == "lab54unl85AC172" > FOR v,e,p IN 1..1 any d GRAPH 'linkGraph' OPTIONS { 'uniqueVertices': > 'global', 'uniqueEdges': 'global'} > filter e.type == "cdp" > return {v:v.hostname, e:e.type, pe: p.edges[*].type, > pv:p.vertices[*].hostname} > > or with filter on path > > filter p.edges[-1].type == "cdp" > > But with no correct results. It seems that filters are only applied on > results and traverse itself is not affected by these filters. Same > situation applies if I tried to filter on vertices. > > Is there a way how to run traverse on subgraph (define subset of edges and > vertices and then run traverse on them). > > Thanks > > Roman > > > > > -- 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 arangodb+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.