Hi all,
Please help me.
I user Traverse API . I want to get node list from the database and that
should be limited to 2 nodes.(similar Sql limit query). How can i stop
the traverse when it found 2 nodes.
i try something as follows but still returns all the nodes found.
return getRefereneNode().getUnderlyingNode().traverse(Order.BREADTH_FIRST,
new LimitEvaluator(),
ReturnableEvaluator.ALL_BUT_START_NODE, RelTypes.TEMP_EMAIL,
Direction.OUTGOING);
private class LimitEvaluator implements StopEvaluator{
@Override
public boolean isStopNode(TraversalPosition currentPos) {
return currentPos.returnedNodesCount()>=2;
}
}
Please help on this.
Thanks
Emil Dombagolla,
_______________________________________________
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register
and consider posting at https://groups.google.com/forum/#!forum/neo4j
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user