How is the SIMILARITY relatonship used in this code?

I have a doubt in query 9 of this article here
In query 7 the author has calculated the cosine similarity and made a new realtionship called similarity.
But in query 9 it has been used to find all the customers who have some similarity relationship with another customer :

MATCH (me:Customer)-[:SIMILARITY]->(c:Customer)-[r:RATED]->(p:Product)

But all customers will have some similarity. If we wanted to use the cosine similarity we have calculated we should have searched the customers who have the highest similarity points with me:Customer.

Can you please explain if i am right or wrong here?

I think this article is showing how you can use similarity relationship to drive recommendations. As you said, in real world you might want to create similar relationships only if it is above certain threshold level.

Assuming that the SIMILARITY relationship is created only between customer that meet that threshold, the query 9 shows means to calculate the recommendations.

The query is trying to find the products the customer "ANTON" that he has not bought or rated but the customers who are similar to him bought or rated and provide recommendations to ANTON.

1 Like