Reputation: 43
This is my first application on neo4j, i like to use the traversal API for better performance and the ease of use, however i was stumped when i looked at the rest traversal most of the operations are not implemented, i am using spring-data-neo4j-rest ( 3.1.2) neo4j kernal and core version os 2.0 Ex. from Resttraversal Src ( only two evaluators are implemented) Am i using the right version if not which version supports more of this one
public RestTraversalDescription evaluator(PathEvaluator evaluator) {
if (evaluator == Evaluators.all()) return add("return_filter",toMap("language","builtin", "name","all"));
if (evaluator == Evaluators.excludeStartPosition()) return add("return_filter",toMap("language","builtin", "name","all_but_start_node"));
throw new UnsupportedOperationException("Only builtin paths supported");
}
@Override
public TraversalDescription expand(PathExpander<?> expander) {
throw new UnsupportedOperationException();
}
@Override
public <STATE> TraversalDescription expand(PathExpander<STATE> expander, InitialStateFactory<STATE> initialState) {
throw new UnsupportedOperationException();
}
NEED HELP and i feel i wasted more than a day browsing for solution....
Upvotes: 1
Views: 308
Reputation: 43
Since i upgraded to Neo4j 2.3, i used cypher as part of the unmanaged extension. Seems working efficiently now also achieving the pattern matching flexibility that cypher provides
Upvotes: 0
Reputation: 39925
The recommended way to get maximum performance for your traversals would be to use unmanaged extensions that internally use the Traversal API.
You bascially write a Java (or Groovy/Clojure/Scala/... ) class using JAX-RS annotations. Your code gets packaged as a jar and deployed to Neo4j's plugins
directory. The annotated methods become new REST endpoints to your Neo4j server.
REST traversals as you intended to use them are a rather old and not widely used feature within the product.
Upvotes: 1