-
Notifications
You must be signed in to change notification settings - Fork 275
/
Neo4jBatch-Implementation.html
111 lines (103 loc) · 5.03 KB
/
Neo4jBatch-Implementation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href=" css/gollum.css" media="all">
<link rel="stylesheet" type="text/css" href=" css/editor.css" media="all">
<link rel="stylesheet" type="text/css" href=" css/dialog.css" media="all">
<link rel="stylesheet" type="text/css" href=" css/template.css" media="all">
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href=" css/ie7.css" media="all">
<![endif]-->
<script type="text/javascript" src=" css/jquery.js"></script>
<script type="text/javascript" src=" css/gollum.js"></script>
<script type="text/javascript" src=" css/gollum.dialog.js"></script>
<script type="text/javascript" src=" css/gollum.placeholder.js"></script>
<script type="text/javascript"
src=" css/editor/gollum.editor.js"></script>
<title>Neo4jBatch Implementation</title>
</head>
<body>
<div id="wiki-wrapper" class="page">
<div id="head"><h3><a href="../../index.html">TinkerPop 2.3.0</a> - <a href="Home.html">Blueprints</a></h3>
<h1>Neo4jBatch Implementation</h1>
<ul class="actions">
<li class="minibutton"><a href="/pages"
class="action-all-pages">All Pages</a></li>
<li class="minibutton" class="jaws">
<a href="#" id="minibutton-new-page">New Page</a></li>
<li class="minibutton"><a href="/edit/Neo4jBatch-Implementation"
class="action-edit-page">Edit Page</a></li>
<li class="minibutton"><a href="/history/Neo4jBatch-Implementation"
class="action-page-history">Page History</a></li>
</ul>
<div id="searchbar">
<form action="/search" method="get" id="search-form">
<div id="searchbar-fauxtext">
<input type="text" name="q" id="search-query" value="Search…" autocomplete="off">
<a href="#" id="search-submit" title="Search this wiki">
<span>Search</span>
</a>
</div>
</form>
</div></div>
<div id="wiki-content">
<div class="wrap">
<div id="wiki-body" class="gollum-textile-content">
<div id="template">
<pre><code><dependency>
<groupId>com.tinkerpop.blueprints</groupId>
<artifactId>blueprints-neo4jbatch-graph</artifactId>
<version>??</version>
</dependency></code></pre>
<pre><code>Graph graph = new Neo4jBatchGraph("/tmp/neo4j");
// do your batch insertion
graph.shutdown();
graph = new Neo4jGraph("/tmp/neo4j");</code></pre>
<p><code>Neo4jBatchGraph</code> provides support for the bulk insertion of data into a <a href="http://neo4j.org">Neo4j</a> graph. This Blueprints implementation is single-threaded and non-transactional. It is meant for initial dumps of raw data into a Neo4j graph and is much faster than doing the equivalent process using <code>Neo4jGraph</code> (see <a class="internal present" href="Neo4j-Implementation.html">Neo4j Implementation</a>).</p>
<p><strong>Note</strong>: This is not a pure Blueprints implementation. Consider the following issues when using <code>Neo4jBatchGraph</code>:</p>
<ol><li>Delete methods (except for <code>Element.removeProperty()</code>) are not supported.</li>
<li>Key indices are not available until after the graph has been shutdown.</li>
</ol><p>Unlike <code>Neo4jGraph</code>, and like <code>TinkerGraph</code>, <code>Neo4jBatchGraph</code> can accept a <code>long</code> id on vertex creation:</p>
<pre><code>long id = 1L;
graph.addVertex(id)</code></pre>
<p>When utilizing <code>Neo4jBatchGraph</code> it is important to make use of the <code>flush</code> method on <code>Neo4jBatchIndex</code>. This method must be called before querying the index for data to ensure that it returns results consistently. This method is not a standard <code>Index</code> <span class="caps">API</span> method and thus, be sure to typecast the index to <code>Neo4jBatchIndex</code>. Note that calling <code>flush</code> (and using indices in general) has a noticeable impact on the performance when writing to the graph. Finally, see <code>Neo4jBatchGraph.flushIndices()</code> for flushing all indices at once.</p>
<h2>Neo4jBatchGraph Feature List</h2>
<pre><code>supportsDuplicateEdges: true
supportsSelfLoops: true
supportsSerializableObjectProperty: false
supportsBooleanProperty: true
supportsDoubleProperty: true
supportsFloatProperty: true
supportsIntegerProperty: true
supportsPrimitiveArrayProperty: true
supportsUniformListProperty: true
supportsMixedListProperty: false
supportsLongProperty: true
supportsMapProperty: false
supportsStringProperty: true
ignoresSuppliedIds: false
isPersistent: true
isRDFModel: false
isWrapper: false
supportsIndices: true
supportsVertexIndex: true
supportsEdgeIndex: true
supportsKeyIndices: true
supportsVertexKeyIndex: true
supportsEdgeKeyIndex: true
supportsEdgeIteration: false
supportsVertexIteration: false
supportsTransactions: false
supportsThreadedTransactions: false</code></pre>
</div>
</div>
</div>
</div>
<div id="footer">
<p id="last-edit">Last edited by <b>joshsh</b>, 2013-03-20 04:57:12</p>
</div>
</div>
<script type="text/javascript" src=" css/MathJax/MathJax.js"></script>
</body>
</html>