Skip to content

Commit

Permalink
Cypher documentation fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
nawroth committed Jan 18, 2012
1 parent 09bd6f5 commit f3b6b9d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
5 changes: 1 addition & 4 deletions cypher/src/docs/dev/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,5 @@ include::ql/functions/index.txt[]

:leveloffset: 2

include::ql/compatibility.txt[]
include::compatibility.txt[]

:leveloffset: 2

include::ql/cookbook/index.txt[]
41 changes: 21 additions & 20 deletions cypher/src/docs/dev/ql/cookbook/index.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,75 +4,76 @@ Cypher Cookbook

The following cookbook aims to provide a few snippets, examples and use-cases and their query-solutions in Cypher.

:leveloffset: 2

[[cypher-cookbook-hyperedges]]
== Hyperedges and Cypher ==

Imagine a user being part of different groups. A group can have different roles, and a
user can be part of different groups. He also can have
different roles in different groups apart from the membership. The
association of a User, a Group and a Role can be referred to as a
_HyperEdge_. However, it can be easily modeled in a property graph as a
node that captures this n-ary relationship, as depicted below in the
+U1G2R1+ node.
Imagine a user being part of different groups.
A group can have different roles, and a user can be part of different groups.
He also can have different roles in different groups apart from the membership.
The association of a User, a Group and a Role can be referred to as a _HyperEdge_.
However, it can be easily modeled in a property graph as a node that captures this n-ary relationship, as depicted below in the +U1G2R1+ node.

include::cypher-hyperedge-graph.txt[]

:leveloffset: 3
:leveloffset: 2

include::find-groups.txt[]

include::find-all-groups-and-roles-for-a-user.txt[]

:leveloffset: 2
:leveloffset: 1

[[cypher-cookbook-friend-finding]]
== Basic Friend finding based on social neighborhood ==

Imagine an example graph like

include::cypher-collabfiltering-graph.txt[]

:leveloffset: 3
:leveloffset: 2

include::simple-friend-finder.txt[]

:leveloffset: 2
:leveloffset: 1

[[cypher-cookbook-co-favorited-places]]
== Co-favorited places ==

:leveloffset: 3
:leveloffset: 2

include::cypher-cofavoritedplaces-graph.txt[]

include::co-favorited-places---users-who-like-x-also-like-y.txt[]

include::co-tagged-places---places-related-through-tags.txt[]

:leveloffset: 2
:leveloffset: 1

[[cypher-cookbook-similar-favorites]]
== Find people based on similar favorites ==

:leveloffset: 3
:leveloffset: 2

include::cypher-peoplesimilarityfavorites-graph.txt[]

include::find-people-based-on-similar-favorites.txt[]

:leveloffset: 2
:leveloffset: 1

[[cypher-cookbook-multirelational-social-network]]
== Multirelational (social) graphs ==

:leveloffset: 3
:leveloffset: 2

include::cypher-multirelationalsocialnetwork-graph.txt[]

include::who-follows-or-loves-me-back.txt[]

//:leveloffset: 2
//:leveloffset: 1

//== Activity Streams ==

//:leveloffset: 3
//:leveloffset: 2

//include::cypher-graphity-graph.txt[]

Expand Down

0 comments on commit f3b6b9d

Please sign in to comment.