October 2017
Beginner to intermediate
316 pages
8h
English
In the following query, we will try to mix all of the three aspects that we mentioned previously into one compound--and hopefully more relevant--recommendation. If we take into account all three angles for our recommendation system, then hopefully we will be able to make fewer, more powerful recommendations to the user.
Let's look at the following query:
match (p1:Person)-[:BOUGHT]->(prod1:Product)<-[:BOUGHT]-(p2:Person)-[:BOUGHT]->(prod2:Product), p1<-[r1]-(parent:Person)-[r2]->p2, prod1-[:MADE_BY]->(br:Brand)<-[:MADE_BY]-(prod2) where type(r1) in ["MOTHER_OF","FATHER_OF"] and type(r2) in ["MOTHER_OF","FATHER_OF"] and not(p1-[:BOUGHT]->prod2) return p1.name as FirstPerson, p2.name as SecondPerson, ...
Read now
Unlock full access