Hi, 

Try this SQL query to see if it's the result you were looking for: 

select username, count(*) from (select expand(out("Friendship")) from User) 
group by username 

Bye Giulia.

Il giorno venerdì 22 maggio 2015 21:47:35 UTC+2, [email protected] ha 
scritto:
>
> How do I write a recommender engine to recommend who to follow based on 
> the people you've already followed?
>
> For example:
> A follows B, C, D.
> B follows C, D, E, F, G.
> C follows E, F, H.
> D follows E, I, J.
> Then the recommender engine should show something like:
> E (3 of your followers are following this person)
> F (2 of your followers are following this person)
> G, H, I, J (no particular order, since they're tied at 1 of your followers 
> is following this person)
>
> My schema:
>
> Vertex:
> User
>   - userID
>   - username
>   - fullName
>
> Edge:
> Friendship
>   - type (string, with enum values of: follow, block)
>   - createDate (date)
>   - isCloseFriend (boolean)
>
> Thanks in advance!
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" 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.

Reply via email to