Hi Linan, http://docs.neo4j.org/chunked/snapshot/tutorials-java-embedded-traversal.html#_new_traversal_framework has an example of an ordered path, does that help? The code for it is at https://github.com/neo4j/community/blob/master/embedded-examples/src/test/java/org/neo4j/examples/orderedpath/OrderedPathTest.java
Also, Gremlin, as Marko states, is applicable here. 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 Fri, Sep 9, 2011 at 4:48 PM, Linan Wang <[email protected]> wrote: > Hi, > > say people read books, books are written by authors, authors has dogs, > then how to reach the dogs of authors of books i've read? when i'm > also a writer, also have dogs, the TraversalDescription seems > inefficient since it'll also traverse my own books and dogs first, > before my customised StopEvaluator stops the expansion process. > > my feeling is RelationshipExpander is the way to go but stucked at the > problem to get the depth info. my goal is to have the designated > RelationshipExpander to tell traverser that at depth 1 only looking > for OUTGOING read relationship, depth 2 for INCOMING wrote > relationship and depth 3 for OUTGOING has relationship. any comment is > appreciated! thanks. > > -- > Best regards > > Linan Wang > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

