Hello,
I am trying to find paths between Person to Song, when the person Owns more than 1 album that Contains the song.
To clarify what I'm trying to do:
1. Person "Erez" -- OWNS--> Album "Anthem of the Sun" --CONTAINS--> Song "Cryptical Envelopment"
2. Person "Erez" -- OWNS--> Album "Anthem of the Sun" --CONTAINS--> Song "The Faster We Go, the Rounder We Get"
3. Person "Erez" -- OWNS--> Album "Anthem of the Sun" --CONTAINS--> Song "We Leave the Castle"
4. Person "Erez" -- OWNS--> Album "Anthem of the Sun Remixed" --CONTAINS--> Song "Cryptical Envelopment"
I'm trying to extract the paths:
Erez, Anthem of the Sun, Cryptical Envelopment
Erez, Anthem of the Sun Remixed, Cryptical Envelopment
I have tried:
1. g.V('Person', 'Erez').sideEffect{x=it}.in('OWNS').in('CONTAINS').groupBy(m){x}{it}{it._().groupCount{it}.cap.next().findAll{s->s.value>1}}. But I lost the context of the album.
2. g.V('Person', 'Erez').in('OWNS').in('CONTAINS').path.groupBy(m){it[0]}{it[2]}{it._().groupCount{it}.cap.next().findAll{s->s.value>1}}. Here I still have the context with the path, but I'm not sure how to filter or use it correctly.
Thanks in advance.