Hi Everyone,

I am having some problems with a query:

FOR v, e, p IN OUTBOUND 'users/120040' GRAPH 'ratedGraph'
    LET user = p.vertices[0]
    LET movie = p.vertices[1]
    FOR genre in movie.genres
UPDATE { _key: user._key, [genre]: user[genre] + 1 }
        IN users

So I have simple named Graph called "ratedGraph". It contains users and 
movies as well as their edges between.

I want to create some kind of user profile, that stores how much a user 
likes a genre.

So I iterate over all connected movies and count the occurring genres. The 
count values shall be stored in the user document, so it would look like 
this:

{
    "_key": "120040",
    "_id": "users/120040",
    "_rev": "_Vxi_Fha--v",
    "Action": 1,
    "Adventure": 1,
    "Thriller": 1,
    ...
  }

But there seems to be something wrong with my query. Each time I run it, 
every genre count value is just incremented by one.

I hope understand my problem and can help me out.

Thank you!

- Tobias


-- 
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 arangodb+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to