Hi,

>> 
> As I see it traversers are fundamentally different from pipes/gremlin, where
> the pipes/gremlin style is very explicit in which steps to traverse. F.ex.
> you must specify that it must first traverse relationships of type X and
> then of type Y a.s.o. and have an exact knowledge of the graph you're
> traversing.

Yes--you can specify label-types in order, or you don't have to:

while null() != $_
   $_ := ./outE/inV[g:print(.)]
   end

or if you only want it to take LOVES or KNOWS relationships

while null() != $_
  $_ := ./ou...@label=g:list('LOVES','KNOWS')]/inV[g:print(.)]
  end

> The neo4j traversers doesn't have that (although they will have soon), but
> they instead can traverse any graph with arbitrary depth and all that...
> f.ex. if you are "standing" on a file in a tree on depth D (i.e. there are D
> parent folders above it) and you'd like to know the OWNER of that file. If
> the OWNER relationships sits on the top-level folders and want to find it
> you'd just tell the traverser to traverse incoming TREE_CHILD and outgoing
> OWNER relationships and return nodes/paths which ends with and OWNER
> relationship and you have your results, however deep the file is in the
> tree.

Let me see here----

while null() != $_
  $_ := 
./i...@label='TREE_CHILD']/outV/ou...@label='OWNER']/inV[g:print(.)]/../..
  end

Little gross looking... but I think that is what you are saying...

> These two ways of traversing a graph complement each other, it's not that
> one is "better" than the other. Would you agree on this?

I will agree to nothing without my lawyers! :{P  
                (note: I use { as I have a mustache these days.)

There are many ways to skin a cat---climb a mountain---using a mailing list. 
But in the end, there will only be 4 or so winners....

Take care,
Marko.

http://markorodriguez.com
_______________________________________________
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to