Skip to content

Instantly share code, notes, and snippets.

@amergin
Created October 11, 2012 16:01
Show Gist options
  • Save amergin/3873399 to your computer and use it in GitHub Desktop.
Save amergin/3873399 to your computer and use it in GitHub Desktop.
cypher test
START node1=node(1456) MATCH node1-[rel1]->node2
WITH node1, rel1, node2 ORDER BY rel1.distance! ASC LIMIT 10
MATCH node2-[rel2]->node3
WHERE node3 <> node1
WITH node2,node3, rel2, rel1 ORDER BY rel2.distance! ASC LIMIT 10
MATCH node3-[rel3]->node4
WHERE node4 <> node2
RETURN DISTINCT rel1, rel2, rel3
ORDER BY rel2.distance! ASC LIMIT 10;
==> +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
==> | rel1 | rel2 | rel3 |
==> +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
==> | :ASSOCIATION[5723289] {distance:205587,importance:0.005597909,pvalue:2.14652185001044,correlation:0.9472778} | :ASSOCIATION[1145696] {distance:2749,importance:0.1317226,pvalue:12.3276228050003,correlation:0.992525} | :ASSOCIATION[7775542] {importance:4.167421E-4,pvalue:1.42316542399294,correlation:0.1214915} |
==> | :ASSOCIATION[6613270] {distance:191345,importance:0.01801085,pvalue:3.55498708861887,correlation:0.9637396} | :ASSOCIATION[4476790] {distance:2749,importance:0.1317226,pvalue:12.3276228050003,correlation:0.992525} | :ASSOCIATION[7959358] {importance:0.002176471,pvalue:1.73777893366254,correlation:-0.6725087} |
==> | :ASSOCIATION[5723289] {distance:205587,importance:0.005597909,pvalue:2.14652185001044,correlation:0.9472778} | :ASSOCIATION[1145696] {distance:2749,importance:0.1317226,pvalue:12.3276228050003,correlation:0.992525} | :ASSOCIATION[7216905] {distance:6260729,importance:0.00221501,pvalue:1.59473152265621,correlation:0.498505} |
==> | :ASSOCIATION[5723289] {distance:205587,importance:0.005597909,pvalue:2.14652185001044,correlation:0.9472778} | :ASSOCIATION[1145696] {distance:2749,importance:0.1317226,pvalue:12.3276228050003,correlation:0.992525} | :ASSOCIATION[7207276] {distance:5457679,importance:0.001903171,pvalue:2.02360627273187,correlation:0.5088791} |
==> | :ASSOCIATION[5723289] {distance:205587,importance:0.005597909,pvalue:2.14652185001044,correlation:0.9472778} | :ASSOCIATION[1145696] {distance:2749,importance:0.1317226,pvalue:12.3276228050003,correlation:0.992525} | :ASSOCIATION[1621623] {importance:0.0,pvalue:1.40046832480742,correlation:0.2895026} |
==> | :ASSOCIATION[6613270] {distance:191345,importance:0.01801085,pvalue:3.55498708861887,correlation:0.9637396} | :ASSOCIATION[4476790] {distance:2749,importance:0.1317226,pvalue:12.3276228050003,correlation:0.992525} | :ASSOCIATION[8399102] {distance:4745522,importance:0.00735249,pvalue:2.06054414901966,correlation:0.9313402} |
==> | :ASSOCIATION[6613270] {distance:191345,importance:0.01801085,pvalue:3.55498708861887,correlation:0.9637396} | :ASSOCIATION[4476790] {distance:2749,importance:0.1317226,pvalue:12.3276228050003,correlation:0.992525} | :ASSOCIATION[7967851] {distance:3263949,importance:0.005049271,pvalue:2.92587356797713,correlation:0.4465127} |
==> | :ASSOCIATION[6613270] {distance:191345,importance:0.01801085,pvalue:3.55498708861887,correlation:0.9637396} | :ASSOCIATION[4476790] {distance:2749,importance:0.1317226,pvalue:12.3276228050003,correlation:0.992525} | :ASSOCIATION[5152977] {distance:8911888,importance:0.003544109,pvalue:1.72330295925574,correlation:0.3753651} |
==> | :ASSOCIATION[6613270] {distance:191345,importance:0.01801085,pvalue:3.55498708861887,correlation:0.9637396} | :ASSOCIATION[4476790] {distance:2749,importance:0.1317226,pvalue:12.3276228050003,correlation:0.992525} | :ASSOCIATION[5993621] {importance:0.0,pvalue:1.3862176731462,correlation:0.1391317} |
==> | :ASSOCIATION[5723289] {distance:205587,importance:0.005597909,pvalue:2.14652185001044,correlation:0.9472778} | :ASSOCIATION[1145696] {distance:2749,importance:0.1317226,pvalue:12.3276228050003,correlation:0.992525} | :ASSOCIATION[4507658] {importance:2.066788E-4,pvalue:1.71817289522207,correlation:0.06404968} |
==> +----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
==> 10 rows
==> 164 ms
==>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment