As the getRelationships() is also iterating and when we throw away 
uninteresting relationships while working through that we'll at least won't 
waste memory.

What could be more interesting is to find all shortest paths between the type 
node and the current node.

i.e.
current node (A) -> rel ->  other node (B) -> instance_of type node (B)

so instead of doing a.getRelationships(type, outgoing).filter { r -> 
r.getEndNode().getSingleRelationship(INSTANCE_OF, 
outgoing).getEndNode().getId().equals(typeNodeBId) }

we could do - give me all shortest paths between A and type node B.

Definitely something to think about :)

Cheers

Michael


Am 28.02.2011 um 22:33 schrieb cedric.hurst:

> This is why I love open source!  52 will essentially give me the filter I'm
> currently doing manually, but in a much more expressive manner.  I'm
> assuming the filter will be post-traversal?  I'm not certain if there would
> be any performance advantage to doing it inside the traversal as an
> evaluator, but it was something I was pondering on my own.  Just haven't had
> time to try it out.
> 
> -- 
> View this message in context: 
> http://neo4j-user-list.438527.n3.nabble.com/Neo4j-Spring-Neo4jTemplate-tp2525460p2598691.html
> Sent from the Neo4J User List mailing list archive at Nabble.com.
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user

_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to