Dario, I am not quite sure I understand what you mean by "drop" is that not to include the path into the result or prune or something else? Do you have a concrete example of this, maybe a simple toy graph test with toy information?
Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/ - Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Wed, Apr 6, 2011 at 6:35 PM, Dario Rexin <dario.re...@xing.com> wrote: > Hello, > > we are trying to construct an Evaluator that will select only one node from > the middle of a path and include it in the result. We do have a specific path > we are looking for and the endNode is stored in 'end'. Now what we would like > to do is have an Evaluator like this: > > import org.neo4j.graphdb.traversal. > Evaluator; > > new Evaluator(){ > @Override > public Evaluation evaluate(org.neo4j.graphdb.Path path) { > if(path.length() > 3) { > return Evaluation.EXCLUDE_AND_PRUNE; > } else if (path.length() == 2) { > return Evaluation.INCLUDE_AND_CONTINUE; > } else if (path.length() < 2){ > return Evaluation.EXCLUDE_AND_CONTINUE; > } else { > return path.endNode().getId() == end.getId() ? > Evaluation.EXCLUDE_AND_PRUNE : Evaluation.DROP_PATH_AND_PRUNE; > } > } > } > > The decision on whether to accept or drop a path is based on wether we have > reached the endNode. That's why we would like to use something like > DROP_PATH_AND_PRUNE, which doesn't exist. What are we missing? > > Any help appreciated! > > Thanks, > Stephan and Dario > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user