Database Reference
In-Depth Information
The recommendations based on social ties
Again, a useful recommendation. But now, let's try to bring it all together and really
try to make a complex, real-time recommendation based on all of the above criteria:
productpurchasehistory,brandloyalty,andsocial/familynetworking.
Bringing it all together - compound
recommendations
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, br.name as
Brand, prod2.name as RecommendedProduct;
 
Search WWH ::




Custom Search