Neo4j Wiki から

Gremlin is a Data-Flow inspired graph traversal and manipulation language, implemented as extensions to Groovy. It helps to express path queries through graph in concise manner while still compiling down to iterator based fast traversal steps in the underlying implementation, see Tinkerpop Pipes.For thorough examples please head over to the Gremlin site, below just a simple example taken from The Gremlin Wiki:

g = new Neo4jGraph('/tmp/neo4j')

// calculate basic collaborative filtering for vertex 1
m = [:]
m.sort{a,b -> a.value <=> b.value}

// calculate the primary eigenvector (eigenvector centrality) of a graph
m = [:]; c = 0;
g.V.outE.inV.groupCount(m).loop(3){c++ < 1000}
m.sort{a,b -> a.value <=> b.value}
Neo4j のサイト