0

Say, I have a graph with following relationship:

app
 ^
 |
 |
tomcat < ------------------
 ^                        |
 |                        |
 |                        |
 |                        |
nginx ----> varnish ----> lvs 

I want to add a filter to the edge between varnish and lvs. How can I do that? Note the p.edges[1].property == value is not what I want. I just want to filter the path nginx->varnish->lvs->tomcat and don't want add filter to the path nginx->tomcat->app.

hughjfchen
  • 21
  • 2
  • How are your collections set up, are these 5 separate collections with edges between them, or is it one collections with a 'vertexType="varnish"' attribute? Do you have an example of your query? Just to give an idea of the way to interrogate p.edges and p.vertex. If you haven't see it, https://docs.arangodb.com/3.0/AQL/Graphs/Traversals.html is a good example of how the traversals are done. If you update your question with info about your query I can help further. – David Thomas Feb 23 '17 at 03:51

1 Answers1

0

Without knowing the details for your collection setup i can only give seem rough advise. If you could describe more details i can give more specific help.

What you could probably do is the following condition:

filter !IS_SAME_COLLECTION(p.edges[1]._from) OR p.edges[1].property == value

mchacki
  • 3,267
  • 13
  • 11