[Neo4j] How to limit Traverser

2012-02-08 Thread Emil Dombagolla
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

Re: [Neo4j] How to limit Traverser

2012-02-08 Thread Peter Neubauer
Emil, there are some good docs at http://docs.neo4j.org/chunked/snapshot/tutorials-java-embedded-traversal.html#_new_traversal_frameworkthat you can use. In your case, you are stopping the traversal but not excluding the nodes you find from being part of the result. It seems you are using the