O'Reilly logo

Neo4j Cookbook by Ankur Goel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Finding user similarity with Neo4j

It is often necessary to find the similarities between things on any social network so as to effectively propose new things and other suggestions.

In this recipe, you will learn how to implement algorithms for finding similarities between users based on some criteria.

Getting ready

The steps required for this recipe are similar to the steps described in the first recipe of this chapter. We are adding one more field, Place visited and times, to similar friends. Instead of the Cypher query used in the first recipe of this chapter, add the following nodes and relationships to a similar Cypher query:

//Places
(pl1:Place { type: 'Disco'}),
(pl2:Place { type : 'Coffee bar'}),
(pl3:Place { type : 'Church'}),
(pl4:Place ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required