On Sat, Aug 6, 2011 at 5:51 AM, Niels Hoogeveen
<pd_aficion...@hotmail.com>wrote:

> .......
> Every part of the database can be accessed with a traveral description.
>
> The standard Neo4j API only allows traversals to return Nodes given a start
> Node. The Enhanced API allows traversals from any part of the graph, whether
> it is a regular Vertex, an Edge or a Property (or a type thereof), to any
> other part of the graph, no matter if it is a regular Vertex, an Edge or a
> Property (or a type thereof).
>
> All that needs to be supplied are the EdgeTypes that need to be followed in
> a traversal (and the regular evaluators that go with it).
>
> Now the big downer to this all:
>
> I still have to write the traversal framework, which will actually follow
> the Standard Neo4j framework, but will certainly make traversals composable.
>
> Every Vertex is not just a Vertex, but it is also a bunch of paths. Well
> not really a bunch, it is a bunch of size one, and not much of a path
> either, since it only contains one path element, the Vertex itself.
>
> A traversal returns a bunch of paths (Iterable<Path>) and starts from a
> bunch of paths (still Iterable<Path>).
>
> Since the output of a traversal is the same as the input of a traversal we
> can now compose them. This makes it possible to write a traversal
> description which states that we want to retrieve the parents of our
> friends, or the neighbours of the parents of our friends, and even: the
> names of the dogs of the neighbours of the parents of our friends (after
> all, we can now traverse to a property).
>
> This can be achieved when we make traversal descriptions composable. Most
> users probably don't want to manually compose traversals, they would much
> rather compose traversal descriptions and let those descriptions do the
> composition of the traversals.
>

I have to write quite complex traversal and can't do it so far.

The use case quite simple, there can be several type of paths:

(1) REF->GET->...
(2) REF->( HAVE | IC )->...
(3) IS*->REF->( HAVE | IC )->... (* - can be several IS relationships)

2 & 3 is allowed, but 1 is not.

For cases 1 & 2 traversal simple to write, but as soon as adding case 3
everything crash. One of possible solution is 'state' at paths or maybe I
over-engineering it =)

-- 
Dmitriy Shabanov
_______________________________________________
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to