Hi,
i would like to ask for help. We are trying use ArangoDB in our startup and now Im little jammed. I have a question for following schema: <https://lh3.googleusercontent.com/-6Y4QaZlx7TM/WDWpOHVt0yI/AAAAAAAABUY/V5YgqBDognAGZwPHzOZarj0JKKrIoYdDgCLcB/s1600/model.png> I tried to get person who is *musician *and *painter*. Solution that i found is: FOR x IN INTERSECTION ( ( FOR v,e IN ANY 'test_vertices/419620442844' GRAPH 'test' OPTIONS { bfs: true, uniqueVertices: 'global' } FILTER e.label == 'instance_of' RETURN v ), ( FOR v,e IN ANY 'test_vertices/419620442862' GRAPH 'test' OPTIONS { bfs: true, uniqueVertices: 'global' } FILTER e.label == 'instance_of' RETURN v ) ) RETURN x Using intersection is fine, but is it exist any better way? I cannot imagine if i would like *all pop albums of performers who are musicians and painters*. And I have similar problem with next schema: <https://lh3.googleusercontent.com/-YouqGGg0Ifw/WDWsinsiQJI/AAAAAAAABUk/tp1VOo4yEDgh_VzT_-_GDn27zlTVIeCwwCLcB/s1600/model2.png> In this I want *all rock albums of John Smith*. When I used graph traversal and got neighborhood of two steps (IN 1..2) and there I could filter path in current layers (steps). But only one condition (instance_of or genre) or using *OR *operator not *AND.* At the beginning i expected that I take neighborhood of John Smith and define acceptance rules for neighborhood node like has edge *instance_of connected to Album *and has edge *genre pointing to Pop *or some callback like solution where i can scan neighborhood and decide. Only i have now is this: FOR p IN 1..2 ANY 'John Smith' GRAPH 'test' FILTER p.edges[0].label == 'performer' AND p.edges[1].label == 'instance_of' AND p.vertices[2].label == 'album' RETURN p This gives me all John Smith's albums, but I dont know how to add that I want all pop albums of John Smith. I cannot use *AND *operator because Im filtering path, so it doesnt make sense and of course with AND it returns empty list. I would like to ask for help. Maybe I did not understand how it works in ArangoDB. I used google and ArangoDB docs, but i cannot find good solution or some material where to study it. Thanks for help. My problem summary: In first schema Im solving problem: *all pop albums of performers who are musicians and painters* In second schem Im solving problem: *all rock albums of John Smith* -- 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.
