From dcdc22796fab95a80ab87cfd073ef5675f71a07b Mon Sep 17 00:00:00 2001 From: Michael Hunger Date: Mon, 9 Dec 2013 11:02:26 +0100 Subject: [PATCH 01/22] update to 2.0 --- other/TVShowGraph.adoc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/other/TVShowGraph.adoc b/other/TVShowGraph.adoc index 2731d9b..ba1058b 100644 --- a/other/TVShowGraph.adoc +++ b/other/TVShowGraph.adoc @@ -1,5 +1,9 @@ = TV Show Graph +:neo4j-version: 2.0.0-RC1 +:author: Kenny Bastani +:twitter: @kennybastani + Sarah Mei recently wrote a http://www.sarahmei.com/blog/2013/11/11/why-you-should-never-use-mongodb/[blog post] describing how she and her colleagues modeled a collection of TV shows and a social network. A few of us at Neo felt strongly that these domains were very graphy in nature. We wanted to see if our intuition was right (we love the Diaspora project and extend our help to you) and so with the help of http://docs.neo4j.org/chunked/preview/cypher-query-lang.html[Cypher], created a mini version of each of the domains that Sarah described. @@ -12,6 +16,8 @@ image::http://www.sarahmei.com/blog/wp-content/uploads/2013/11/Screen-Shot-2013- == The TV Series setup +// setup +// hide [source,cypher] ---- CREATE (himym:TVShow {name: "How I Met Your Mother"}) @@ -81,7 +87,7 @@ We could also grab the reviews if there are any by slightly tweaking the query: MATCH (tvShow:TVShow)-[:HAS_SEASON]->(season)-[:HAS_EPISODE]->(episode) WHERE tvShow.name = "How I Met Your Mother" WITH season, episode -MATCH episode-[?:HAS_REVIEW]->(review) +OPTIONAL MATCH episode-[:HAS_REVIEW]->(review) RETURN season, episode, review ---- From b6f1a4d5a47bf4bb933ed38586cf9eef769ec451 Mon Sep 17 00:00:00 2001 From: Peter Neubauer Date: Mon, 9 Dec 2013 11:04:10 +0100 Subject: [PATCH 02/22] Update TVShowGraph.adoc --- other/TVShowGraph.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/other/TVShowGraph.adoc b/other/TVShowGraph.adoc index ba1058b..ea5d0f5 100644 --- a/other/TVShowGraph.adoc +++ b/other/TVShowGraph.adoc @@ -87,7 +87,7 @@ We could also grab the reviews if there are any by slightly tweaking the query: MATCH (tvShow:TVShow)-[:HAS_SEASON]->(season)-[:HAS_EPISODE]->(episode) WHERE tvShow.name = "How I Met Your Mother" WITH season, episode -OPTIONAL MATCH episode-[:HAS_REVIEW]->(review) +OPTIONAL MATCH (episode)-[:HAS_REVIEW]->(review) RETURN season, episode, review ---- From 450c363e7a3f67e88b2ea4696d6098272c37d0e8 Mon Sep 17 00:00:00 2001 From: Peter Neubauer Date: Thu, 12 Dec 2013 11:05:40 +0100 Subject: [PATCH 03/22] Update Home.adoc --- meta/Home.adoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index 3543d87..aa79c95 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -32,9 +32,12 @@ A first simple query to just create a node: [source,cypher] ---- -CREATE (n{name:'first node'}); +CREATE (n{name:'first node'}) +RETURN n; ---- +//table + NOTE: This document is a GraphGist, use the Page Source button on top of the page to see the document behind it. == Examples From b31b77d689f70cbe1f80fcd8db941f3cb7161a19 Mon Sep 17 00:00:00 2001 From: Anders Nawroth Date: Mon, 16 Dec 2013 11:25:40 +0100 Subject: [PATCH 04/22] Use 2.0.0. --- meta/Home.adoc | 2 +- meta/HowTo.adoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index aa79c95..0d9e7d3 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -1,6 +1,6 @@ = Neo4j GraphGist = -:neo4j-version: 2.0.0-RC1 +:neo4j-version: 2.0.0 :author: Anders Nawroth :twitter: @nawroth :tags: domain:example diff --git a/meta/HowTo.adoc b/meta/HowTo.adoc index bb3de0d..df7b8ff 100644 --- a/meta/HowTo.adoc +++ b/meta/HowTo.adoc @@ -1,6 +1,6 @@ = How to create a GraphGist -:neo4j-version: 2.0.0-RC1 +:neo4j-version: 2.0.0 :author: Anders Nawroth :twitter: @nawroth From 844c751a265092af18554ae0ea0469566eb84d2a Mon Sep 17 00:00:00 2001 From: jvilledieu Date: Mon, 28 Apr 2014 11:59:10 +0200 Subject: [PATCH 05/22] Update NetworkDataCenterManagement1.adoc --- other/NetworkDataCenterManagement1.adoc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/other/NetworkDataCenterManagement1.adoc b/other/NetworkDataCenterManagement1.adoc index bddb09f..b1a294f 100644 --- a/other/NetworkDataCenterManagement1.adoc +++ b/other/NetworkDataCenterManagement1.adoc @@ -404,4 +404,18 @@ RETURN "[" + head(nodes(p)).host + "]" + reduce(s = "", n in tail(nodes(p)) | s + " -> " + "[" + n.host + "]") as Chain ---- -//table \ No newline at end of file +//table + +=== Find the impact of the removal of a network component : Hardware Server + +The query below finds the applications depending on ACME's HARDWARE-SERVER-3. In case a network administrator wants to plan an intervention on the server, he has to know what will be the applications impacted. This way he can warn the applications users. + +[source,cypher] +---- +MATCH (application:Application)-[:DEPENDS_ON*]->(server) +WHERE server.host = "HARDWARE-SERVER-3" +RETURN application.type as Type, + application.host as Host +---- + +//table From f639ef4dbf0b45ec6340493c74388affaf26e5e1 Mon Sep 17 00:00:00 2001 From: Anders Nawroth Date: Mon, 19 May 2014 20:43:12 +0200 Subject: [PATCH 06/22] Link to second graphgist challenge winners. --- meta/Home.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index 0d9e7d3..5f8607c 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -9,7 +9,7 @@ Neo4j GraphGists are a way to share documents including Cypher queries. The queries can be executed in an online console. GraphGists can be used to share examples or ideas or outline a question you have. -See also the https://github.com/neo4j-contrib/graphgist/wiki[GraphGist Collection] and check out the *http://blog.neo4j.org/2013/10/the-first-graphgist-challenge-completed.html[results of the first GraphGist Challenge]*! +See also the https://github.com/neo4j-contrib/graphgist/wiki[GraphGist Collection] and check out the *http://neo4j.com/blog/graph-gist-winter-challenge-winners/[results of the second GraphGist Challenge]*! You create a GraphGist by creating a https://gist.github.com/[GitHub Gist] in http://asciidoctor.org/docs/asciidoc-quick-reference/[AsciiDoc] and enter the URL to it in the form on this page. The GraphGist is just as private as the GitHub Gist you created. From 12f7bcc1b1f97e630907c4fc73b5a9d17011d2f1 Mon Sep 17 00:00:00 2001 From: Michael Hunger Date: Fri, 23 May 2014 01:18:19 +0200 Subject: [PATCH 07/22] Update Home.adoc --- meta/Home.adoc | 68 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 18 deletions(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index 5f8607c..3d33a4b 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -5,42 +5,74 @@ :twitter: @nawroth :tags: domain:example -Neo4j GraphGists are a way to share documents including Cypher queries. -The queries can be executed in an online console. -GraphGists can be used to share examples or ideas or outline a question you have. +== What are GraphGists ? -See also the https://github.com/neo4j-contrib/graphgist/wiki[GraphGist Collection] and check out the *http://neo4j.com/blog/graph-gist-winter-challenge-winners/[results of the second GraphGist Challenge]*! +http://neo4j.com[Neo4j] GraphGists are an easy way to create and share documents containing not just prose, structure +and pictures but most importantly **example graph models and use-cases** expressed in Neo4j's query language http://docs.neo4j.org/refcard/2.1/[Cypher]. -You create a GraphGist by creating a https://gist.github.com/[GitHub Gist] in http://asciidoctor.org/docs/asciidoc-quick-reference/[AsciiDoc] and enter the URL to it in the form on this page. -The GraphGist is just as private as the GitHub Gist you created. -To share a GraphGist, just share the URL the page gets after entering the Gist in the form. +These documents are written in the simple, textual Markup language AsciiDoc and rendered in your browser as rich and interactive +web pages that you can quickly evolve from describing simple howtos or questions to providing an extensive use-case specification. -For instructions, see: +To see the expressive power of this approach, here are the winners of our community competitions: + +=== Examples + +* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8021754) [Organization Learning](http://gist.neo4j.org/?8021754) by [@luannem] (https://twitter.com/luannem) +* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8167705) [Legislative System Graph](http://gist.neo4j.org/?8167705) by [@yaravind](https://twitter.com/yaravind) +* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?github-neo4j-contrib%2Fgists%2F%2Fother%2FBankFraudDetection.adoc) [Bank Fraud Detection](http://gist.neo4j.org/?github-neo4j-contrib%2Fgists%2F%2Fother%2FBankFraudDetection.adoc) by [@kennybastani] +* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8412907) [Project Management](http://gist.neo4j.org/?8412907) by [@_nicolemargaret](https://twitter.com/_nicolemargaret) +* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8019511) [Alpine Skiing seasons] (http://gist.neo4j.org/?8019511) by [@pac_19] (https://twitter.com/pac_19) +* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?7968633) [Pharmaceutical Drugs and their Targets](http://gist.neo4j.org/?7968633) by [@joshkunken] (https://twitter.com/joshkunken) +* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8141937) [Piping Water](http://gist.neo4j.org/?8141937) by [@shaundaley1](https://twitter.com/shaundaley1) +* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8139605) [Single Malt Scotch Whisky](http://gist.neo4j.org/?8139605) by [@patbaumgartner](https://twitter.com/patbaumgartner) +* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8526106) [Amazon Web Services Global Infrastructure Graph](http://gist.neo4j.org/?8526106) by [@aidanjcasey](https://twitter.com/aidanjcasey) +* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8635758) [Roads, Nodes and Automobiles](http://gist.neo4j.org/?8635758) by [@tekiegirl](http://www.jacqui.tk) +* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8173017) [Movie Recommendations with k-NN and Cosine Similarity](http://gist.neo4j.org/?8173017) by [@_nicolemargaret] +* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?6506717) [Chess Games and Positions](http://gist.neo4j.org/?6506717) by [@wefreema](https://twitter.com/wefreema) +* *Many more examples can be found in the https://github.com/neo4j-contrib/graphgist/wiki[GraphGist Collection]* + +=== It is really easy to get started: + +0. **Log into** your GitHub account +1. **choose** one of the examples listed above, click the green **page source** button. +2. **fork** the original GraphGist into your own account and **start to edit** the prose, images, setup and use-case Cypher queries +3. **paste** the Github Gist URL into the top right URL box of any GraphGist page, your Gist will be loaded and rendered immediately +4. **reload** your GraphGist page whenever you made an update to your document +5. **share** your GraphGist with your colleagues, friends or us, hit the submit link in the footer, when you are ready to get your t-shirt reward ++++ -

How to create a Neoj4 GraphGist from Peter Neubauer on Vimeo.

+

How to create a Neoj4 GraphGist from Peter Neubauer on Vimeo.

++++ * link:./?github-neo4j-contrib%2Fgists%2F%2Fmeta%2FSimple.adoc[A simple GraphGist] * link:./?github-neo4j-contrib%2Fgists%2F%2Fmeta%2FHowTo.adoc[How to create a GraphGist] -This is what the result can look like: -//console +=== Setup a Graph to show you and your Likes -A first simple query to just create a node: +And render as a graph. +//setup [source,cypher] ---- -CREATE (n{name:'first node'}) -RETURN n; +CREATE (you:Person {name:"You"})-[like:LIKE]->(us:Database:NoSql:Graph {name:"Neo4j" }) +RETURN you,like,us ---- -//table +//graph + +=== Now query the graph to show all the things you like -NOTE: This document is a GraphGist, use the Page Source button on top of the page to see the document behind it. +And render as a table. -== Examples +[source,cypher] +---- +CREATE (you:Person {name:"You"})-[like:LIKE]->(us:Database:NoSql:Graph {name:"Neo4j" }) +RETURN you.name as who ,type(like) as how,us.name as what +---- + +//table -* link:./?5956880[Create nodes and relationships] +NOTE: This document is a GraphGist itself, so you can use the green +Page Source+ button on top of the page to see the original AsciiDoc document. +We'd love to get your feedback, so feel free to write us at *docs at neo4j.org* or comment in the section below. From dd7ba603eebc9f54821f9e7f840e12c2908dd3ba Mon Sep 17 00:00:00 2001 From: Michael Hunger Date: Fri, 23 May 2014 01:23:44 +0200 Subject: [PATCH 08/22] Update Home.adoc --- meta/Home.adoc | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index 3d33a4b..f16f02e 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -17,18 +17,15 @@ To see the expressive power of this approach, here are the winners of our commun === Examples -* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8021754) [Organization Learning](http://gist.neo4j.org/?8021754) by [@luannem] (https://twitter.com/luannem) -* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8167705) [Legislative System Graph](http://gist.neo4j.org/?8167705) by [@yaravind](https://twitter.com/yaravind) -* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?github-neo4j-contrib%2Fgists%2F%2Fother%2FBankFraudDetection.adoc) [Bank Fraud Detection](http://gist.neo4j.org/?github-neo4j-contrib%2Fgists%2F%2Fother%2FBankFraudDetection.adoc) by [@kennybastani] -* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8412907) [Project Management](http://gist.neo4j.org/?8412907) by [@_nicolemargaret](https://twitter.com/_nicolemargaret) -* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8019511) [Alpine Skiing seasons] (http://gist.neo4j.org/?8019511) by [@pac_19] (https://twitter.com/pac_19) -* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?7968633) [Pharmaceutical Drugs and their Targets](http://gist.neo4j.org/?7968633) by [@joshkunken] (https://twitter.com/joshkunken) -* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8141937) [Piping Water](http://gist.neo4j.org/?8141937) by [@shaundaley1](https://twitter.com/shaundaley1) -* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8139605) [Single Malt Scotch Whisky](http://gist.neo4j.org/?8139605) by [@patbaumgartner](https://twitter.com/patbaumgartner) -* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8526106) [Amazon Web Services Global Infrastructure Graph](http://gist.neo4j.org/?8526106) by [@aidanjcasey](https://twitter.com/aidanjcasey) -* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8635758) [Roads, Nodes and Automobiles](http://gist.neo4j.org/?8635758) by [@tekiegirl](http://www.jacqui.tk) -* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?8173017) [Movie Recommendations with k-NN and Cosine Similarity](http://gist.neo4j.org/?8173017) by [@_nicolemargaret] -* ![](https://graphgist-status.herokuapp.com/?url=http://gist.neo4j.org/?6506717) [Chess Games and Positions](http://gist.neo4j.org/?6506717) by [@wefreema](https://twitter.com/wefreema) +* link:./?github-neo4j-contrib%2Fgists%2F%2Fother%2FBankFraudDetection.adoc[Bank Fraud Detection] by https://twitter.com/kennybastani[@kennybastani] +* link:./?8019511[Alpine Skiing seasons] by https://twitter.com/pac_19[@pac_19] +* link:./?7968633[Pharmaceutical Drugs and their Targets] by [@joshkunken](https://twitter.com/joshkunken) +* link:./?8141937[Piping Water] by https://twitter.com/shaundaley1[@shaundaley1] +* link:./?8139605[Single Malt Scotch Whisky] by https://twitter.com/patbaumgartner[@patbaumgartner] +* link:./?8526106[Amazon Web Services Global Infrastructure Graph] by https://twitter.com/aidanjcasey[@aidanjcasey] +* link:./?8635758[Roads, Nodes and Automobiles] by http://www.jacqui.tk[@tekiegirl] +* link:./?8173017[Movie Recommendations with k-NN and Cosine Similarity] by [@_nicolemargaret] +* link:./?6506717[Chess Games and Positions] by https://twitter.com/wefreema[@wefreema] * *Many more examples can be found in the https://github.com/neo4j-contrib/graphgist/wiki[GraphGist Collection]* === It is really easy to get started: @@ -41,7 +38,7 @@ To see the expressive power of this approach, here are the winners of our commun 5. **share** your GraphGist with your colleagues, friends or us, hit the submit link in the footer, when you are ready to get your t-shirt reward ++++ -

How to create a Neoj4 GraphGist from Peter Neubauer on Vimeo.

+ ++++ * link:./?github-neo4j-contrib%2Fgists%2F%2Fmeta%2FSimple.adoc[A simple GraphGist] From e3a3f4f52827dcebdb14d0c657ed2fc5c42410c7 Mon Sep 17 00:00:00 2001 From: Michael Hunger Date: Fri, 23 May 2014 01:24:47 +0200 Subject: [PATCH 09/22] Update Home.adoc --- meta/Home.adoc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index f16f02e..5e4e2a6 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -1,6 +1,6 @@ = Neo4j GraphGist = -:neo4j-version: 2.0.0 +:neo4j-version: 2.1.0 :author: Anders Nawroth :twitter: @nawroth :tags: domain:example @@ -13,7 +13,7 @@ and pictures but most importantly **example graph models and use-cases** express These documents are written in the simple, textual Markup language AsciiDoc and rendered in your browser as rich and interactive web pages that you can quickly evolve from describing simple howtos or questions to providing an extensive use-case specification. -To see the expressive power of this approach, here are the winners of our community competitions: +To see the expressive power of this approach, here are some winners of our past community competitions: === Examples @@ -31,11 +31,11 @@ To see the expressive power of this approach, here are the winners of our commun === It is really easy to get started: 0. **Log into** your GitHub account -1. **choose** one of the examples listed above, click the green **page source** button. -2. **fork** the original GraphGist into your own account and **start to edit** the prose, images, setup and use-case Cypher queries -3. **paste** the Github Gist URL into the top right URL box of any GraphGist page, your Gist will be loaded and rendered immediately -4. **reload** your GraphGist page whenever you made an update to your document -5. **share** your GraphGist with your colleagues, friends or us, hit the submit link in the footer, when you are ready to get your t-shirt reward +1. **Choose** one of the examples listed above, click the green **page source** button. +2. **Fork** the original GraphGist into your own account and **start to edit** the prose, images, setup and use-case Cypher queries +3. **Paste** the Github Gist URL into the top right URL box of any GraphGist page, your Gist will be loaded and rendered immediately +4. **Reload** your GraphGist page whenever you made an update to your document +5. **Share** your GraphGist with your colleagues, friends or us, hit the submit link in the footer, when you are ready to get your t-shirt reward ++++ From 53a32c2f4473e54697a92fde93e9644793862eb9 Mon Sep 17 00:00:00 2001 From: Michael Hunger Date: Fri, 23 May 2014 01:31:19 +0200 Subject: [PATCH 10/22] Update Home.adoc --- meta/Home.adoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index 5e4e2a6..4c8828f 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -1,17 +1,17 @@ -= Neo4j GraphGist = += What is the Neo4j GraphGist Project? = :neo4j-version: 2.1.0 :author: Anders Nawroth :twitter: @nawroth :tags: domain:example -== What are GraphGists ? +:image:https://dl.dropboxusercontent.com/u/14493611/neo4j-logo.png[] http://neo4j.com[Neo4j] GraphGists are an easy way to create and share documents containing not just prose, structure and pictures but most importantly **example graph models and use-cases** expressed in Neo4j's query language http://docs.neo4j.org/refcard/2.1/[Cypher]. -These documents are written in the simple, textual Markup language AsciiDoc and rendered in your browser as rich and interactive -web pages that you can quickly evolve from describing simple howtos or questions to providing an extensive use-case specification. +These documents are written in AsciiDoc - the simple, textual markup language - and rendered in your browser as rich and interactive web pages that you +can quickly evolve from describing simple howtos or questions to providing an extensive use-case specification. To see the expressive power of this approach, here are some winners of our past community competitions: From b5770166142bc983827988852997bc482d36d4fd Mon Sep 17 00:00:00 2001 From: Michael Hunger Date: Fri, 23 May 2014 01:31:39 +0200 Subject: [PATCH 11/22] Update Home.adoc --- meta/Home.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index 4c8828f..1df9f88 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -5,7 +5,7 @@ :twitter: @nawroth :tags: domain:example -:image:https://dl.dropboxusercontent.com/u/14493611/neo4j-logo.png[] +image:https://dl.dropboxusercontent.com/u/14493611/neo4j-logo.png[] http://neo4j.com[Neo4j] GraphGists are an easy way to create and share documents containing not just prose, structure and pictures but most importantly **example graph models and use-cases** expressed in Neo4j's query language http://docs.neo4j.org/refcard/2.1/[Cypher]. From 7f1998072fc1a5e7b61f7cb14f34dff63e021ba3 Mon Sep 17 00:00:00 2001 From: Michael Hunger Date: Fri, 23 May 2014 01:37:16 +0200 Subject: [PATCH 12/22] Update Home.adoc --- meta/Home.adoc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index 1df9f88..4947422 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -19,12 +19,12 @@ To see the expressive power of this approach, here are some winners of our past * link:./?github-neo4j-contrib%2Fgists%2F%2Fother%2FBankFraudDetection.adoc[Bank Fraud Detection] by https://twitter.com/kennybastani[@kennybastani] * link:./?8019511[Alpine Skiing seasons] by https://twitter.com/pac_19[@pac_19] -* link:./?7968633[Pharmaceutical Drugs and their Targets] by [@joshkunken](https://twitter.com/joshkunken) +* link:./?7968633[Pharmaceutical Drugs and their Targets] by https://twitter.com/joshkunken[@joshkunken] * link:./?8141937[Piping Water] by https://twitter.com/shaundaley1[@shaundaley1] * link:./?8139605[Single Malt Scotch Whisky] by https://twitter.com/patbaumgartner[@patbaumgartner] * link:./?8526106[Amazon Web Services Global Infrastructure Graph] by https://twitter.com/aidanjcasey[@aidanjcasey] * link:./?8635758[Roads, Nodes and Automobiles] by http://www.jacqui.tk[@tekiegirl] -* link:./?8173017[Movie Recommendations with k-NN and Cosine Similarity] by [@_nicolemargaret] +* link:./?8173017[Movie Recommendations with k-NN and Cosine Similarity] by http://twitter.com/_nicolemargaret[@_nicolemargaret] * link:./?6506717[Chess Games and Positions] by https://twitter.com/wefreema[@wefreema] * *Many more examples can be found in the https://github.com/neo4j-contrib/graphgist/wiki[GraphGist Collection]* @@ -41,10 +41,6 @@ To see the expressive power of this approach, here are some winners of our past ++++ -* link:./?github-neo4j-contrib%2Fgists%2F%2Fmeta%2FSimple.adoc[A simple GraphGist] -* link:./?github-neo4j-contrib%2Fgists%2F%2Fmeta%2FHowTo.adoc[How to create a GraphGist] - - === Setup a Graph to show you and your Likes And render as a graph. @@ -73,3 +69,10 @@ RETURN you.name as who ,type(like) as how,us.name as what NOTE: This document is a GraphGist itself, so you can use the green +Page Source+ button on top of the page to see the original AsciiDoc document. We'd love to get your feedback, so feel free to write us at *docs at neo4j.org* or comment in the section below. + +/* +=== Some Templates + +* link:./?github-neo4j-contrib%2Fgists%2F%2Fmeta%2FSimple.adoc[A simple GraphGist] +* link:./?github-neo4j-contrib%2Fgists%2F%2Fmeta%2FHowTo.adoc[How to create a GraphGist] +*/ From 4317ec689409849913f88dee59865bdfd358cc2d Mon Sep 17 00:00:00 2001 From: Michael Hunger Date: Fri, 23 May 2014 01:38:22 +0200 Subject: [PATCH 13/22] Update Home.adoc --- meta/Home.adoc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index 4947422..e035731 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -41,9 +41,8 @@ To see the expressive power of this approach, here are some winners of our past ++++ -=== Setup a Graph to show you and your Likes -And render as a graph. +=== Setup a Graph to show you and your Likes //setup [source,cypher] @@ -52,18 +51,20 @@ CREATE (you:Person {name:"You"})-[like:LIKE]->(us:Database:NoSql:Graph {name:"Ne RETURN you,like,us ---- +And render as a graph. + //graph === Now query the graph to show all the things you like -And render as a table. - [source,cypher] ---- CREATE (you:Person {name:"You"})-[like:LIKE]->(us:Database:NoSql:Graph {name:"Neo4j" }) RETURN you.name as who ,type(like) as how,us.name as what ---- +And render as a table. + //table NOTE: This document is a GraphGist itself, so you can use the green +Page Source+ button on top of the page to see the original AsciiDoc document. From c3fee230632158a3215cc893af118ace7a418d83 Mon Sep 17 00:00:00 2001 From: Michael Hunger Date: Fri, 23 May 2014 01:52:32 +0200 Subject: [PATCH 14/22] Update Home.adoc --- meta/Home.adoc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index e035731..62fe34d 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -17,15 +17,15 @@ To see the expressive power of this approach, here are some winners of our past === Examples -* link:./?github-neo4j-contrib%2Fgists%2F%2Fother%2FBankFraudDetection.adoc[Bank Fraud Detection] by https://twitter.com/kennybastani[@kennybastani] -* link:./?8019511[Alpine Skiing seasons] by https://twitter.com/pac_19[@pac_19] -* link:./?7968633[Pharmaceutical Drugs and their Targets] by https://twitter.com/joshkunken[@joshkunken] -* link:./?8141937[Piping Water] by https://twitter.com/shaundaley1[@shaundaley1] -* link:./?8139605[Single Malt Scotch Whisky] by https://twitter.com/patbaumgartner[@patbaumgartner] -* link:./?8526106[Amazon Web Services Global Infrastructure Graph] by https://twitter.com/aidanjcasey[@aidanjcasey] -* link:./?8635758[Roads, Nodes and Automobiles] by http://www.jacqui.tk[@tekiegirl] -* link:./?8173017[Movie Recommendations with k-NN and Cosine Similarity] by http://twitter.com/_nicolemargaret[@_nicolemargaret] -* link:./?6506717[Chess Games and Positions] by https://twitter.com/wefreema[@wefreema] +Finance:: link:./?github-neo4j-contrib%2Fgists%2F%2Fother%2FBankFraudDetection.adoc[Bank Fraud Detection] by https://twitter.com/kennybastani[@kennybastani] +Sports:: link:./?8019511[Alpine Skiing seasons] by https://twitter.com/pac_19[@pac_19] +Life Science:: link:./?7968633[Pharmaceutical Drugs and their Targets] by https://twitter.com/joshkunken[@joshkunken] +Resources:: link:./?8141937[Piping Water] by https://twitter.com/shaundaley1[@shaundaley1] +Retail:: link:./?8139605[Single Malt Scotch Whisky] by https://twitter.com/patbaumgartner[@patbaumgartner] +Telecommunications:: link:./?8526106[Amazon Web Services Global Infrastructure Graph] by https://twitter.com/aidanjcasey[@aidanjcasey] +Infrastructure:: link:./?8635758[Roads, Nodes and Automobiles] by http://www.jacqui.tk[@tekiegirl] +Recommendation:: link:./?8173017[Movie Recommendations with k-NN and Cosine Similarity] by http://twitter.com/_nicolemargaret[@_nicolemargaret] +Fun:: link:./?6506717[Chess Games and Positions] by https://twitter.com/wefreema[@wefreema] * *Many more examples can be found in the https://github.com/neo4j-contrib/graphgist/wiki[GraphGist Collection]* === It is really easy to get started: From fa23c35c12cde1d1ab055c82646b81c449e18099 Mon Sep 17 00:00:00 2001 From: Michael Hunger Date: Fri, 23 May 2014 01:55:43 +0200 Subject: [PATCH 15/22] Update Home.adoc --- meta/Home.adoc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index 62fe34d..058f379 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -16,16 +16,16 @@ can quickly evolve from describing simple howtos or questions to providing an ex To see the expressive power of this approach, here are some winners of our past community competitions: === Examples - -Finance:: link:./?github-neo4j-contrib%2Fgists%2F%2Fother%2FBankFraudDetection.adoc[Bank Fraud Detection] by https://twitter.com/kennybastani[@kennybastani] -Sports:: link:./?8019511[Alpine Skiing seasons] by https://twitter.com/pac_19[@pac_19] -Life Science:: link:./?7968633[Pharmaceutical Drugs and their Targets] by https://twitter.com/joshkunken[@joshkunken] -Resources:: link:./?8141937[Piping Water] by https://twitter.com/shaundaley1[@shaundaley1] -Retail:: link:./?8139605[Single Malt Scotch Whisky] by https://twitter.com/patbaumgartner[@patbaumgartner] -Telecommunications:: link:./?8526106[Amazon Web Services Global Infrastructure Graph] by https://twitter.com/aidanjcasey[@aidanjcasey] -Infrastructure:: link:./?8635758[Roads, Nodes and Automobiles] by http://www.jacqui.tk[@tekiegirl] -Recommendation:: link:./?8173017[Movie Recommendations with k-NN and Cosine Similarity] by http://twitter.com/_nicolemargaret[@_nicolemargaret] -Fun:: link:./?6506717[Chess Games and Positions] by https://twitter.com/wefreema[@wefreema] +[none] +* **Finance** link:./?github-neo4j-contrib%2Fgists%2F%2Fother%2FBankFraudDetection.adoc[Bank Fraud Detection] by https://twitter.com/kennybastani[@kennybastani] +* **Sports** link:./?8019511[Alpine Skiing seasons] by https://twitter.com/pac_19[@pac_19] +* **Life Science** link:./?7968633[Pharmaceutical Drugs and their Targets] by https://twitter.com/joshkunken[@joshkunken] +* **Resources** link:./?8141937[Piping Water] by https://twitter.com/shaundaley1[@shaundaley1] +* **Retail** link:./?8139605[Single Malt Scotch Whisky] by https://twitter.com/patbaumgartner[@patbaumgartner] +* **Telecommunications** link:./?8526106[Amazon Web Services Global Infrastructure Graph] by https://twitter.com/aidanjcasey[@aidanjcasey] +* **Infrastructure** link:./?8635758[Roads, Nodes and Automobiles] by http://www.jacqui.tk[@tekiegirl] +* **Recommendation** link:./?8173017[Movie Recommendations with k-NN and Cosine Similarity] by http://twitter.com/_nicolemargaret[@_nicolemargaret] +* **Fun** link:./?6506717[Chess Games and Positions] by https://twitter.com/wefreema[@wefreema] * *Many more examples can be found in the https://github.com/neo4j-contrib/graphgist/wiki[GraphGist Collection]* === It is really easy to get started: From a48c790fc12bcb66d62d314c20a3992aa8246696 Mon Sep 17 00:00:00 2001 From: Michael Hunger Date: Fri, 23 May 2014 02:00:00 +0200 Subject: [PATCH 16/22] Update Home.adoc --- meta/Home.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index 058f379..1e04818 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -26,7 +26,7 @@ To see the expressive power of this approach, here are some winners of our past * **Infrastructure** link:./?8635758[Roads, Nodes and Automobiles] by http://www.jacqui.tk[@tekiegirl] * **Recommendation** link:./?8173017[Movie Recommendations with k-NN and Cosine Similarity] by http://twitter.com/_nicolemargaret[@_nicolemargaret] * **Fun** link:./?6506717[Chess Games and Positions] by https://twitter.com/wefreema[@wefreema] -* *Many more examples can be found in the https://github.com/neo4j-contrib/graphgist/wiki[GraphGist Collection]* +* **One hundred more** examples can be found in the https://github.com/neo4j-contrib/graphgist/wiki[GraphGist Collection] === It is really easy to get started: From 6ff2116300c15698cb49b8c5231bdcd4b0262b9f Mon Sep 17 00:00:00 2001 From: Michael Hunger Date: Fri, 23 May 2014 03:20:16 +0200 Subject: [PATCH 17/22] Update Home.adoc --- meta/Home.adoc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index 1e04818..a4cd7ba 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -71,9 +71,5 @@ NOTE: This document is a GraphGist itself, so you can use the green +Page Source We'd love to get your feedback, so feel free to write us at *docs at neo4j.org* or comment in the section below. -/* -=== Some Templates - -* link:./?github-neo4j-contrib%2Fgists%2F%2Fmeta%2FSimple.adoc[A simple GraphGist] -* link:./?github-neo4j-contrib%2Fgists%2F%2Fmeta%2FHowTo.adoc[How to create a GraphGist] -*/ +// * link:./?github-neo4j-contrib%2Fgists%2F%2Fmeta%2FSimple.adoc[A simple GraphGist] +// * link:./?github-neo4j-contrib%2Fgists%2F%2Fmeta%2FHowTo.adoc[How to create a GraphGist] From ff0de805804f9a9a3f3d136ba96f0c92dfb09c72 Mon Sep 17 00:00:00 2001 From: Michael Hunger Date: Fri, 23 May 2014 03:21:13 +0200 Subject: [PATCH 18/22] Update Home.adoc --- meta/Home.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index a4cd7ba..f6c6382 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -67,7 +67,7 @@ And render as a table. //table -NOTE: This document is a GraphGist itself, so you can use the green +Page Source+ button on top of the page to see the original AsciiDoc document. +NOTE: This document is a GraphGist itself, so you can use the green https://github.com/neo4j-contrib/gists/blob/master/meta/Home.adoc[Page Source] button on top of the page to see the original AsciiDoc document. We'd love to get your feedback, so feel free to write us at *docs at neo4j.org* or comment in the section below. From 91df17a2b0aff64490b3b432c4f8a4cc9b79ff74 Mon Sep 17 00:00:00 2001 From: Anders Nawroth Date: Fri, 23 May 2014 14:47:36 +0200 Subject: [PATCH 19/22] Fix AsciiDoc warnings and the second CYpher statement.. --- meta/Home.adoc | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index f6c6382..50a728d 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -15,7 +15,7 @@ can quickly evolve from describing simple howtos or questions to providing an ex To see the expressive power of this approach, here are some winners of our past community competitions: -=== Examples +== Examples [none] * **Finance** link:./?github-neo4j-contrib%2Fgists%2F%2Fother%2FBankFraudDetection.adoc[Bank Fraud Detection] by https://twitter.com/kennybastani[@kennybastani] * **Sports** link:./?8019511[Alpine Skiing seasons] by https://twitter.com/pac_19[@pac_19] @@ -28,14 +28,17 @@ To see the expressive power of this approach, here are some winners of our past * **Fun** link:./?6506717[Chess Games and Positions] by https://twitter.com/wefreema[@wefreema] * **One hundred more** examples can be found in the https://github.com/neo4j-contrib/graphgist/wiki[GraphGist Collection] -=== It is really easy to get started: +== Getting Started -0. **Log into** your GitHub account -1. **Choose** one of the examples listed above, click the green **page source** button. -2. **Fork** the original GraphGist into your own account and **start to edit** the prose, images, setup and use-case Cypher queries -3. **Paste** the Github Gist URL into the top right URL box of any GraphGist page, your Gist will be loaded and rendered immediately -4. **Reload** your GraphGist page whenever you made an update to your document -5. **Share** your GraphGist with your colleagues, friends or us, hit the submit link in the footer, when you are ready to get your t-shirt reward +=== Follow these easy steps + +. **Log into** your GitHub account +. **Choose** one of the examples listed above, click the green **page source** button. +. **Fork** the original GraphGist into your own account and **start to edit** the prose, images, setup and use-case Cypher queries. +. **Paste** the Github Gist URL into the top right URL box of any GraphGist page and hit enter; your Gist will be loaded and rendered immediately. +. **Reload** your GraphGist page whenever you made an update to your document. +. **Share** your GraphGist with your colleagues, friends or us. + Hit the submit link in the footer, when you are ready to get your t-shirt reward. ++++ @@ -48,7 +51,7 @@ To see the expressive power of this approach, here are some winners of our past [source,cypher] ---- CREATE (you:Person {name:"You"})-[like:LIKE]->(us:Database:NoSql:Graph {name:"Neo4j" }) -RETURN you,like,us +RETURN you, like, us ---- And render as a graph. @@ -59,8 +62,8 @@ And render as a graph. [source,cypher] ---- -CREATE (you:Person {name:"You"})-[like:LIKE]->(us:Database:NoSql:Graph {name:"Neo4j" }) -RETURN you.name as who ,type(like) as how,us.name as what +MATCH (you:Person {name:"You"})-[like:LIKE]->(liked) +RETURN you.name AS who, type(like) AS how, liked.name AS what ---- And render as a table. From dd7b077c48e78d0cf60adccb9d734bf796d6e40c Mon Sep 17 00:00:00 2001 From: Anders Nawroth Date: Fri, 23 May 2014 17:22:54 +0200 Subject: [PATCH 20/22] Formatting. --- meta/Home.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index 50a728d..93aa2e7 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -10,7 +10,7 @@ image:https://dl.dropboxusercontent.com/u/14493611/neo4j-logo.png[] http://neo4j.com[Neo4j] GraphGists are an easy way to create and share documents containing not just prose, structure and pictures but most importantly **example graph models and use-cases** expressed in Neo4j's query language http://docs.neo4j.org/refcard/2.1/[Cypher]. -These documents are written in AsciiDoc - the simple, textual markup language - and rendered in your browser as rich and interactive web pages that you +These documents are written in AsciiDoc -- the simple, textual markup language -- and rendered in your browser as rich and interactive web pages that you can quickly evolve from describing simple howtos or questions to providing an extensive use-case specification. To see the expressive power of this approach, here are some winners of our past community competitions: From c390f2bda6a0cdf6bb9e1f9766d001d72510ca8c Mon Sep 17 00:00:00 2001 From: Kenny Bastani Date: Wed, 7 Jan 2015 21:58:26 -0800 Subject: [PATCH 21/22] Adding AIM use case GraphGist Lots of credit goes to @whatsocks for writing the Cypher queries --- meta/Home.adoc | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/Home.adoc b/meta/Home.adoc index 93aa2e7..cd9d535 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -17,6 +17,7 @@ To see the expressive power of this approach, here are some winners of our past == Examples [none] +* **Identity and Access Management** link:./?4471127413fd724ed0a3[Entitlements and Access Control] by https://twitter.com/kennybastani[@kennybastani] * **Finance** link:./?github-neo4j-contrib%2Fgists%2F%2Fother%2FBankFraudDetection.adoc[Bank Fraud Detection] by https://twitter.com/kennybastani[@kennybastani] * **Sports** link:./?8019511[Alpine Skiing seasons] by https://twitter.com/pac_19[@pac_19] * **Life Science** link:./?7968633[Pharmaceutical Drugs and their Targets] by https://twitter.com/joshkunken[@joshkunken] From c82cea6c0cfe9a2b7dae31885f5c0579c4a6f25b Mon Sep 17 00:00:00 2001 From: Azasyaid404 <74691820+Azasyaid404@users.noreply.github.com> Date: Tue, 8 Dec 2020 01:38:45 +0700 Subject: [PATCH 22/22] Revert "Master" --- meta/Home.adoc | 76 +++++++------------------ meta/HowTo.adoc | 2 +- other/NetworkDataCenterManagement1.adoc | 16 +----- other/TVShowGraph.adoc | 8 +-- 4 files changed, 23 insertions(+), 79 deletions(-) diff --git a/meta/Home.adoc b/meta/Home.adoc index cd9d535..3543d87 100644 --- a/meta/Home.adoc +++ b/meta/Home.adoc @@ -1,79 +1,43 @@ -= What is the Neo4j GraphGist Project? = += Neo4j GraphGist = -:neo4j-version: 2.1.0 +:neo4j-version: 2.0.0-RC1 :author: Anders Nawroth :twitter: @nawroth :tags: domain:example -image:https://dl.dropboxusercontent.com/u/14493611/neo4j-logo.png[] +Neo4j GraphGists are a way to share documents including Cypher queries. +The queries can be executed in an online console. +GraphGists can be used to share examples or ideas or outline a question you have. -http://neo4j.com[Neo4j] GraphGists are an easy way to create and share documents containing not just prose, structure -and pictures but most importantly **example graph models and use-cases** expressed in Neo4j's query language http://docs.neo4j.org/refcard/2.1/[Cypher]. +See also the https://github.com/neo4j-contrib/graphgist/wiki[GraphGist Collection] and check out the *http://blog.neo4j.org/2013/10/the-first-graphgist-challenge-completed.html[results of the first GraphGist Challenge]*! -These documents are written in AsciiDoc -- the simple, textual markup language -- and rendered in your browser as rich and interactive web pages that you -can quickly evolve from describing simple howtos or questions to providing an extensive use-case specification. +You create a GraphGist by creating a https://gist.github.com/[GitHub Gist] in http://asciidoctor.org/docs/asciidoc-quick-reference/[AsciiDoc] and enter the URL to it in the form on this page. +The GraphGist is just as private as the GitHub Gist you created. +To share a GraphGist, just share the URL the page gets after entering the Gist in the form. -To see the expressive power of this approach, here are some winners of our past community competitions: - -== Examples -[none] -* **Identity and Access Management** link:./?4471127413fd724ed0a3[Entitlements and Access Control] by https://twitter.com/kennybastani[@kennybastani] -* **Finance** link:./?github-neo4j-contrib%2Fgists%2F%2Fother%2FBankFraudDetection.adoc[Bank Fraud Detection] by https://twitter.com/kennybastani[@kennybastani] -* **Sports** link:./?8019511[Alpine Skiing seasons] by https://twitter.com/pac_19[@pac_19] -* **Life Science** link:./?7968633[Pharmaceutical Drugs and their Targets] by https://twitter.com/joshkunken[@joshkunken] -* **Resources** link:./?8141937[Piping Water] by https://twitter.com/shaundaley1[@shaundaley1] -* **Retail** link:./?8139605[Single Malt Scotch Whisky] by https://twitter.com/patbaumgartner[@patbaumgartner] -* **Telecommunications** link:./?8526106[Amazon Web Services Global Infrastructure Graph] by https://twitter.com/aidanjcasey[@aidanjcasey] -* **Infrastructure** link:./?8635758[Roads, Nodes and Automobiles] by http://www.jacqui.tk[@tekiegirl] -* **Recommendation** link:./?8173017[Movie Recommendations with k-NN and Cosine Similarity] by http://twitter.com/_nicolemargaret[@_nicolemargaret] -* **Fun** link:./?6506717[Chess Games and Positions] by https://twitter.com/wefreema[@wefreema] -* **One hundred more** examples can be found in the https://github.com/neo4j-contrib/graphgist/wiki[GraphGist Collection] - -== Getting Started - -=== Follow these easy steps - -. **Log into** your GitHub account -. **Choose** one of the examples listed above, click the green **page source** button. -. **Fork** the original GraphGist into your own account and **start to edit** the prose, images, setup and use-case Cypher queries. -. **Paste** the Github Gist URL into the top right URL box of any GraphGist page and hit enter; your Gist will be loaded and rendered immediately. -. **Reload** your GraphGist page whenever you made an update to your document. -. **Share** your GraphGist with your colleagues, friends or us. - Hit the submit link in the footer, when you are ready to get your t-shirt reward. +For instructions, see: ++++ - +

How to create a Neoj4 GraphGist from Peter Neubauer on Vimeo.

++++ +* link:./?github-neo4j-contrib%2Fgists%2F%2Fmeta%2FSimple.adoc[A simple GraphGist] +* link:./?github-neo4j-contrib%2Fgists%2F%2Fmeta%2FHowTo.adoc[How to create a GraphGist] -=== Setup a Graph to show you and your Likes - -//setup -[source,cypher] ----- -CREATE (you:Person {name:"You"})-[like:LIKE]->(us:Database:NoSql:Graph {name:"Neo4j" }) -RETURN you, like, us ----- +This is what the result can look like: -And render as a graph. +//console -//graph - -=== Now query the graph to show all the things you like +A first simple query to just create a node: [source,cypher] ---- -MATCH (you:Person {name:"You"})-[like:LIKE]->(liked) -RETURN you.name AS who, type(like) AS how, liked.name AS what +CREATE (n{name:'first node'}); ---- -And render as a table. - -//table +NOTE: This document is a GraphGist, use the Page Source button on top of the page to see the document behind it. -NOTE: This document is a GraphGist itself, so you can use the green https://github.com/neo4j-contrib/gists/blob/master/meta/Home.adoc[Page Source] button on top of the page to see the original AsciiDoc document. +== Examples -We'd love to get your feedback, so feel free to write us at *docs at neo4j.org* or comment in the section below. +* link:./?5956880[Create nodes and relationships] -// * link:./?github-neo4j-contrib%2Fgists%2F%2Fmeta%2FSimple.adoc[A simple GraphGist] -// * link:./?github-neo4j-contrib%2Fgists%2F%2Fmeta%2FHowTo.adoc[How to create a GraphGist] diff --git a/meta/HowTo.adoc b/meta/HowTo.adoc index df7b8ff..bb3de0d 100644 --- a/meta/HowTo.adoc +++ b/meta/HowTo.adoc @@ -1,6 +1,6 @@ = How to create a GraphGist -:neo4j-version: 2.0.0 +:neo4j-version: 2.0.0-RC1 :author: Anders Nawroth :twitter: @nawroth diff --git a/other/NetworkDataCenterManagement1.adoc b/other/NetworkDataCenterManagement1.adoc index b1a294f..bddb09f 100644 --- a/other/NetworkDataCenterManagement1.adoc +++ b/other/NetworkDataCenterManagement1.adoc @@ -404,18 +404,4 @@ RETURN "[" + head(nodes(p)).host + "]" + reduce(s = "", n in tail(nodes(p)) | s + " -> " + "[" + n.host + "]") as Chain ---- -//table - -=== Find the impact of the removal of a network component : Hardware Server - -The query below finds the applications depending on ACME's HARDWARE-SERVER-3. In case a network administrator wants to plan an intervention on the server, he has to know what will be the applications impacted. This way he can warn the applications users. - -[source,cypher] ----- -MATCH (application:Application)-[:DEPENDS_ON*]->(server) -WHERE server.host = "HARDWARE-SERVER-3" -RETURN application.type as Type, - application.host as Host ----- - -//table +//table \ No newline at end of file diff --git a/other/TVShowGraph.adoc b/other/TVShowGraph.adoc index ea5d0f5..2731d9b 100644 --- a/other/TVShowGraph.adoc +++ b/other/TVShowGraph.adoc @@ -1,9 +1,5 @@ = TV Show Graph -:neo4j-version: 2.0.0-RC1 -:author: Kenny Bastani -:twitter: @kennybastani - Sarah Mei recently wrote a http://www.sarahmei.com/blog/2013/11/11/why-you-should-never-use-mongodb/[blog post] describing how she and her colleagues modeled a collection of TV shows and a social network. A few of us at Neo felt strongly that these domains were very graphy in nature. We wanted to see if our intuition was right (we love the Diaspora project and extend our help to you) and so with the help of http://docs.neo4j.org/chunked/preview/cypher-query-lang.html[Cypher], created a mini version of each of the domains that Sarah described. @@ -16,8 +12,6 @@ image::http://www.sarahmei.com/blog/wp-content/uploads/2013/11/Screen-Shot-2013- == The TV Series setup -// setup -// hide [source,cypher] ---- CREATE (himym:TVShow {name: "How I Met Your Mother"}) @@ -87,7 +81,7 @@ We could also grab the reviews if there are any by slightly tweaking the query: MATCH (tvShow:TVShow)-[:HAS_SEASON]->(season)-[:HAS_EPISODE]->(episode) WHERE tvShow.name = "How I Met Your Mother" WITH season, episode -OPTIONAL MATCH (episode)-[:HAS_REVIEW]->(review) +MATCH episode-[?:HAS_REVIEW]->(review) RETURN season, episode, review ----