Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Read Neo4j's documentation [1](well, don't read; just gloss over it). You'll be blown away by how much it can do. I recommend looking at chapter 5. An example, with the actual query:

-----------

5.3.1. Co-Favorited Places - Users Who Like x Also Like y

Find places that people also like who favorite this place:

* Determine who has favorited place x.

* What else have they favorited that is not place x.

Query:

    START place=node:node_auto_index(name = "CoffeeShop1")
    MATCH place<-[:favorite]-person-[:favorite]->stuff
    RETURN stuff.name, count(*)
    ORDER BY count(*) DESC, stuff.name
-----------

[1]: PDF: http://docs.neo4j.org/pdf/neo4j-manual-milestone.pdf , online: http://docs.neo4j.org/chunked/milestone/



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: