Arangodb update properties depend on edge type

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?

+6
source share
1 answer

In the end, I use a custom crawl object that works directly inside Foxx to get the best out of the world: performance and correctness. It seemed that we could not do the above using only AQL

0
source

All Articles