You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2015/06/08 20:21:27 UTC

incubator-tinkerpop git commit: trying to get index hits fast for Neo4j docs -- has to do with warming up the cache.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master be4fa4378 -> bc4de5e48


trying to get index hits fast for Neo4j docs -- has to do with warming up the cache.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/bc4de5e4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/bc4de5e4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/bc4de5e4

Branch: refs/heads/master
Commit: bc4de5e4822a1c8592bc98e0582125ef2167eb98
Parents: be4fa43
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Mon Jun 8 12:21:22 2015 -0600
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Jun 8 12:21:22 2015 -0600

----------------------------------------------------------------------
 docs/src/implementations.asciidoc | 25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/bc4de5e4/docs/src/implementations.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/implementations.asciidoc b/docs/src/implementations.asciidoc
index c31e31f..3d2ce63 100644
--- a/docs/src/implementations.asciidoc
+++ b/docs/src/implementations.asciidoc
@@ -589,25 +589,28 @@ Below demonstrates the runtime benefits of indices and demonstrates how if there
 [gremlin-groovy]
 ----
 graph = Neo4jGraph.open('/tmp/neo4j')
-graph.cypher("CREATE INDEX ON :artist(name)") <1>
-graph.tx().commit()
 graph.io(graphml()).readGraph('data/grateful-dead.xml')
-g = graph.traversal(standard())
-clock(1000) {g.V().hasLabel('artist').has('name','Garcia').iterate()}  <2>
-clock(1000) {g.V().has('name','Garcia').iterate()} <3>
-graph.cypher("DROP INDEX ON :artist(name)") <4>
 g.tx().commit()
+g = graph.traversal(standard())
+clock(1000) {g.V().hasLabel('artist').has('name','Garcia').iterate()}  <1>
+clock(1000) {g.V().has('name','Garcia').iterate()} <2>
+graph.cypher("CREATE INDEX ON :artist(name)") <3>
+graph.tx().commit()
+Thread.sleep(5000) <4>
 clock(1000) {g.V().hasLabel('artist').has('name','Garcia').iterate()} <5>
 clock(1000) {g.V().has('name','Garcia').iterate()} <6>
+graph.cypher("DROP INDEX ON :artist(name)") <7>
+g.tx().commit()
 graph.close()
 ----
 
-<1> Create an index for all artist vertices on their name property.
-<2> Find all artists whose name is Garcia which uses the pre-defined schema index.
-<3> Find all vertices whose name is Garcia which requires a linear scan of all the data in the graph.
-<4> Drop the created index.
-<5> Find all artists whose name is Garcia which does a linear scan of the artist vertex-label partition.
+<1> Find all artists whose name is Garcia which does a linear scan of the artist vertex-label partition.
+<2> Find all vertices whose name is Garcia which requires a linear scan of all the data in the graph.
+<3> Create an index for all artist vertices on their name property.
+<4> Neo4j indices are eventually consistent so this stalls to give the index to populate itself.
+<5> Find all artists whose name is Garcia which uses the pre-defined schema index.
 <6> Find all vertices whose name is Garcia which requires a linear scan of all the data in the graph.
+<7> Drop the created index.
 
 Multi/Meta-Properties
 ~~~~~~~~~~~~~~~~~~~~~