Skip to content

Instantly share code, notes, and snippets.

I took a look at the document and had the following comments. Keep in mind I have no experience with the internals of Neo4j and only moderate experience with using Neo4j (exclusively the REST endpoint using Cypher as the query language). I thought I would share my thoughts just in case any of it might prove useful.
Gzip
I didn’t see any mention of support for Gzip encoding the results. Since the result sets for Neo4j queries can be large, there would be significant benefit to supporting compression. I expected to see the following specified on each of the requests:
Accept-Encoding: gzip, compress
Requests
[ERROR ] An un-handled exception was caught by salt's global exception handler:
OverflowError: long too big to convert
Traceback (most recent call last):
File "/usr/bin/salt", line 10, in <module>
salt_main()
File "/usr/lib/python2.7/dist-packages/salt/scripts.py", line 135, in salt_main
client.run()
File "/usr/lib/python2.7/dist-packages/salt/cli/__init__.py", line 138, in run
for full_ret in cmd_func(**kwargs):
File "/usr/lib/python2.7/dist-packages/salt/client/__init__.py", line 553, in cmd_cli
@bunkat
bunkat / gist:9494429e3cbbbeda2b11
Last active August 29, 2015 14:01
Getting lots of optional nodes in a single Cypher query
= Graph Initialization
I'm using Neo4j 2.0.1 with Cypher over the Batch REST API.
//hide
//setup
//output
[source,cypher]
----
CREATE (u:user {id: "u1", name: "Bill"})-[:CONTACT]->(c:contact {id: "c1"})
@bunkat
bunkat / Profile Output
Created May 28, 2014 05:07
Neo4j Query and Profile Output for querying files with optional matches
ColumnFilter(symKeys=["f", "r"], returnItemNames=["r"], _rows=2, _db_hits=0)
Extract(symKeys=["f", "r"], exprKeys=["r"], _rows=2, _db_hits=20)
ColumnFilter(symKeys=["f", "xs", "r"], returnItemNames=["f", "r"], _rows=2, _db_hits=0)
Extract(symKeys=["f", "xs", "r"], exprKeys=["r"], _rows=2, _db_hits=0)
ColumnFilter(symKeys=["f", "r", " INTERNAL_AGGREGATEd2d4a2d9-40fe-4813-be68-60e8e99c6e05"], returnItemNames=["f", "xs", "r"], _rows=2, _db_hits=0)
EagerAggregation(keys=["f", "r"], aggregates=["( INTERNAL_AGGREGATEd2d4a2d9-40fe-4813-be68-60e8e99c6e05,Collect(x))"], _rows=2, _db_hits=0)
NullableMatch(_rows=2, _db_hits=0)
SimplePatternMatcher(g="(f)-[' UNNAMED1483']-(x)", _rows=0, _db_hits=0)
ColumnFilter(symKeys=["f", "xs", "r"], returnItemNames=["f", "r"], _rows=2, _db_hits=0)
Extract(symKeys=["f", "xs", "r"], exprKeys=["r"], _rows=2, _db_hits=2)
@bunkat
bunkat / debug output
Last active August 29, 2015 14:08
Regex Failure
bill@levelstory-dev:~/dev$ groovy debug_property.groovy ~/Downloads/neo4j-community-2.1.5/data/graph.db/
97402 I(49) n(6e) t(74) r(72) o(6f) d(64) u(75) c(63) i(69) n(6e) g(67) (20) o(6f) u(75) r(72) (20) n(6e) e(65) w(77) (20) R(52) i(69) p(70) (20) C(43) u(75) r(72) l(6c) (20) l(6c) i(69) n(6e) e(65) a(61) r(72) (20) g(67) l(6c) a(61) s(73) s(73) (20) m(6d) o(6f) s(73) a(61) i(69) c(63) (20) t(74) i(69) l(6c) e(65) s(73) .(2e) (20) T(54) h(68) i(69) s(73) (20) C(43) a(61) r(72) i(69) b(62) b(62) e(65) a(61) n(6e) (20) c(63) o(6f) l(6c) o(6f) r(72) (20) c(63) o(6f) m(6d) b(62) i(69) n(6e) a(61) t(74) i(69) o(6f) n(6e) (20) o(6f) f(66) (20) g(67) r(72) e(65) e(65) n(6e) s(73) (20) a(61) n(6e) d(64) (20) b(62) l(6c) u(75) e(65) s(73) (20) b(62) r(72) i(69) n(6e) g(67) s(73) (20) a(61) (20) w(77) a(61) r(72) m(6d) (20) i(69) n(6e) v(76) i(69) t(74) i(69) n(6e) g(67) (20) f(66) e(65) e(65) l(6c) i(69) n(6e) g(67) (20) t(74) o(6f) (20) a(61) (20) k(6b) i(69) t(74) c(63) h(68) e(65) n(6e)
@bunkat
bunkat / index.html
Created May 4, 2012 16:25 — forked from adamgreenhall/index.html
d3 time with custom range (for simple time scatter plot)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang='en'>
<head>
<title>The d3 test</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.time.js"></script>
</head>
<body>
<script type="text/javascript" src="scatterchart.js"></script>
@bunkat
bunkat / index.html
Created May 4, 2012 18:04 — forked from stepheneb/index.html
D3 Example: zoom, pan, and axis rescale
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>One Graph</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script>
<script type="text/javascript" src="simple-graph.js"></script>
<style type="text/css">
body { font: 13px sans-serif; }
rect { fill: #fff; }
@bunkat
bunkat / index.html
Created May 4, 2012 20:58 — forked from stepheneb/index.html
D3 Example: zoom, pan, and axis rescale
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>One Graph</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script>
<script type="text/javascript" src="simple-graph.js"></script>
<style type="text/css">
body { font: 13px sans-serif; }
rect { fill: #fff; }
@bunkat
bunkat / grid.js
Created May 5, 2012 19:38
Grid in d3.js
/**
* calendarWeekHour Setup a week-hour grid:
* 7 Rows (days), 24 Columns (hours)
* @param id div id tag starting with #
* @param width width of the grid in pixels
* @param height height of the grid in pixels
* @param square true/false if you want the height to
* match the (calculated first) width
*/
function calendarWeekHour(id, width, height, square)
@bunkat
bunkat / index.html
Created July 17, 2012 05:48
Swimlane with internal data and date axis
<html>
<head>
<title>Swimlane using d3.js</title>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.v2.js"></script>
<script type="text/javascript" src="randomData.js"></script>