I am trying to use AQL to update the whole node collection , named Nodes, depend on the type of edges they have .
Requirement:
- Basically, if 2 entity in Nodes has relation type= "Same", they would be updated with unique groupid properties (same for more than 2)
- This would only run one time in the beginning (to populate groupid)
My concept approach:
- Use AQL
- For each entity inside Node, query out all connectable nodes with type=SAME
- Generate an groupid and Update all of them
- Write to an lookup object those id
- For next entity, do a lookup, skip the entity if their id is there.
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 am quite new to arangodb AQL, is something like above possible?