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..10000 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to