I am trying to use AQL to update an entire node collection called Nodes , depending on the type of edges they have.
Demand:
- Basically, if 2 objects in Nodes have a relationship type = "Same", they will be updated using the unique groupid properties (the same for more than 2)
- This will only be done once at the beginning (to populate groupid )
My conceptual approach:
- Use AQL
- For each object inside Node, request all pluggable nodes with type = SAME
- Create a group and update all of them
- Write to the search object those id
- For the next object, search, skip the object if their identifier exists.
What i tried
FOR v,e,p
In 1..10
ANY v
EntityRelationTest
OPTIONS {uniqueVertices:"global",bfs:true}
FILTER p.edges[*].relationType[0]== "EQUALS"
UPDATE v WITH { typeName2:"test1"} IN EntityTest
return NEW
But I'm completely new to arangodb AQL, is something like the above possible?
source
share