With the traversal framework, the actual work of traversing happens lazily on every call on hasNext/next on the returned Traverser (in the end Iterator<Path>). You can simply stop pulling more paths after a certain number of paths have been extracted.
On Monday, January 25, 2016 at 8:31:37 AM UTC+1, Radheshyam Verma wrote: > > Hi, > I am using traversal framework to traverse graph which returns nodes. > Can we somehow specify a limit on number of nodes which the traversal > returns like we do in Query using "LIMIT" and "SKIP". > Thanks. > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.