enerate random traversals, so that in the DFS the traverser chooses
the children in random order. By this way I will get many valid
post-order labelings.
Is this possible in the current traversal API or in the Improved framework?
Thanks,
p.s. : This email is indeed a reply to Tobias' "
; What I am concerned is a slight variation of this problem. In the
> >> above example, the
> >> visitation order of the children is important. For example, if the
> >> traverser had chosen D before B while processing the children of A,
> >> the labels would
m traversals, so that in the DFS the traverser chooses
> the children in random order. By this way I will get many valid
> post-order labelings.
>
> Is this possible in the current traversal API or in the Improved framework?
>
> Thanks,
>
>
> p.s. : This email is indeed a r
visitation order of the children is important. For example, if the
>> traverser had chosen D before B while processing the children of A,
>> the labels would end up being C=1, D=2,B=3 and A=4. I'd like to
>> generate random traversals, so that in the DFS the traverser
requests for a way to select the next relationship to traverse using a
callback interface, instead of only having DEPTH_FIRST and BREADTH_FIRST to
choose from.
To address these requests we have started a project to implement a new
traversal framework. The early prototype for this is available in my
>> A -> B , B -> C , A->D , D->C
> > >>
> > >> An example traverser labels the nodes with post-order values as C=1,
> > >> B=2,D=3 and A=4. Because the depth first traversal first finishes C,
> > >> then B, then D and finally A.
> > &g
am
missing something. So how can make my expander use the path info?
Thanks and best regards,
Georg
On 19.05.2010 09:46, Tobias Ivarsson wrote:
> Since the traversal framework is still a work in progress we are still
> tinkering with the API around SourceSelectors and RelationshipEx
Since the traversal framework is still a work in progress we are still
tinkering with the API around SourceSelectors and RelationshipExpander.
Mattias Persson and myself are working on creating examples and
documentation as well.
The purpose of the SourceSelector is mainly to determine the order
se using a
> callback interface, instead of only having DEPTH_FIRST and BREADTH_FIRST to
> choose from.
>
> To address these requests we have started a project to implement a new
> traversal framework. The early prototype for this is available in my
> laboratory directory in the rep
Hi all,
Hopefully most of you are familiar with the traversal framework that was
introduced in 1.1. It's powerful and provides for reusable traversal
descriptions. It has some flaws though, and I would like to discuss one of
them here.
The traversal framework has this concept of pruning,
Dear all,
could somebody point me to more documentation on the new traversal
framework (besides http://wiki.neo4j.org/content/Traversal_Framework)?
Also the new Evaluator and how to use it?
If we have a graph described in the pipes Co-Developers example
(https://github.com/tinkerpop/pipes/wiki
Yes, one of the goals of the new traversal framework has been to make it
possible to implement algorithms on top of it. You are welcome to help in
that process.
Mattias Persson and myself have started implementing a number of graph
algorithms on top of the traversal framework.
We have discussed
2011/3/15 Craig Taverner
> >
> > > One question before I dive into this... Do the Traversal framework
> > > involve performance improvements over the core API as shown in your
> > > example?
> >
> > It doesn't currently, since it's using t
, "David Montag"
wrote:
> Hi all,
>
> Hopefully most of you are familiar with the traversal framework that was
> introduced in 1.1. It's powerful and provides for reusable traversal
> descriptions. It has some flaws though, and I would like to discuss one of
> them here
, Direction.INCOMING).traverse(startNode);
i.e. add more relationship types by just calling the "relationships" method
multiple times.
2011/3/14 Massimo Lusetti
> I'm using the Traversal framework
> (http://wiki.neo4j.org/content/Traversal_Framework) and I would like
> to know
>
> > One question before I dive into this... Do the Traversal framework
> > involve performance improvements over the core API as shown in your
> > example?
>
> It doesn't currently, since it's using the core API. But I think the goal
> is
> to hav
;
>
> 2011/3/14 Massimo Lusetti
>
>> I'm using the Traversal framework
>> (http://wiki.neo4j.org/content/Traversal_Framework) and I would like
>> to know if I'm using it the way it has thought to be.
>>
>> I need to deeply traverse the graph going dow
I'm using the Traversal framework
(http://wiki.neo4j.org/content/Traversal_Framework) and I would like
to know if I'm using it the way it has thought to be.
I need to deeply traverse the graph going down through different
RelationshipTypes so I do a first TraversalDescription and while
de);
> for(Relationship relB : nodeA.getRelationships(B)) {
> Node nodeB = relB.getOtherNode(nodeA);
> // nodeB will be the node (3) from the above example
> }
> }
One question before I dive into this... Do the Traversal framework
involve performance imp
tional
state is needed to be returned, you just add another enum and don't have to
change all the existing values..
Hope this makes sense.
--- Yaniv
On Fri, Nov 5, 2010 at 8:56 PM, David Montag wrote:
> Hi all,
>
> Hopefully most of you are familiar with the traversal framework that
On Tue, Mar 30, 2010 at 4:20 PM, Marko Rodriguez wrote:
> Hi guys,
>
> For what its worth
>
> I have yet to use the Neo4j traversal framework because it is simply is not
> expressive enough. The traverser framework is like a single-relational
> traverser on a multi-relat
2011/3/15 Massimo Lusetti
> On Tue, Mar 15, 2011 at 9:11 AM, Mattias Persson
> wrote:
>
> > more advanced. If you would like to force the traversal down a very
> defined
> > path then go with the core API, like:
> >
> > for(Relationship relA : startNode.
Will the new traversal framework help with implementing some new graph
algorithms? I'm most interested in Bellman-Ford and Ford-Fulkerson.
It seems like the new control over relationship selection in
traversal should help a lot.
There's a lot of fast versions of Bellman-Ford discuss
On Sun, Feb 20, 2011 at 10:48 AM, Alfredas Chmieliauskas <
al.fre...@gmail.com> wrote:
> Dear all,
>
> could somebody point me to more documentation on the new traversal
> framework (besides http://wiki.neo4j.org/content/Traversal_Framework)?
> Also the new Evaluator and h
u just add another enum and don't have to
> change all the existing values..
>
> Hope this makes sense.
> --- Yaniv
>
> On Fri, Nov 5, 2010 at 8:56 PM, David Montag <
> david.mon...@neotechnology.com
> > wrote:
>
> > Hi all,
> >
> > Hopeful
> 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 no
uator, so if additional
>> state is needed to be returned, you just add another enum and don't have
>> to
>> change all the existing values..
>>
>> Hope this makes sense.
>> --- Yaniv
>>
>> On Fri, Nov 5, 2010 at 8:56 PM, David Montag <
>&
Thanks.
On Sun, Feb 20, 2011 at 2:24 PM, Tobias Ivarsson
wrote:
> On Sun, Feb 20, 2011 at 10:48 AM, Alfredas Chmieliauskas <
> al.fre...@gmail.com> wrote:
>
>> Dear all,
>>
>> could somebody point me to more documentation on the new traversal
>> framework
Hello,
We are trying to use neo4j graph database in one of our applications.
I think we hit a roadblock with traversal framework. It could be due to our
limited knowledge of neo4j framework.
Here is what we are trying to accomplish:
We need to get a path(from the graph below) from the nodes A to
ew API.
>
> I started using this framework from day 1 since I'm new and I don't
> have background from Node.traverse(). If I understand correctly this
> "will be" THE traversal framework right?
>
> It's experimental but you use this from within Node.traverse so
On Mon, Mar 14, 2011 at 3:13 PM, Mattias Persson
wrote:
> Would you like to do a traversal where relationships of different types can
> be traversed? That can/should be done with one traversal, one
> TraversalDescription:
>
> Traversal.description()
> .r
Hi all,
I would like to detect all cycles in a traversal.
I know the traversal framework has cycle avoidance built-in, but there
doesn't seem to be an API for cycle detection!
Has anyone already implemented a cycle detector for traversals?
Thanks in advance,
W
2011/4/7 Michael Hunger :
> I think the confusing thing here is that ReturnableEvaluator talked about
> including/excluding nodes
> whereas when describing the Evaluations you spoke about including/excluding
> paths.
Oh, sorry... one major difference from the old traversal framewor
Hi Ido,
You make excellent points. The traversal API that you're referring
to (Node.traverse) is however considered a legacy, stable API. What you are
looking for is probably the newer, unstable API of the new traversal
framework. You can read more about it here:
http://wiki.neo4j.org/co
Respected,
I would to know that is there any method to count the number of nodes and
relationships traversed by the traversal framework.
Like path.length() ---> which gives the depth of the tree. So as like that
method is there any direct one?
For example,
If a tree consist of several nodes
ut
> including/excluding nodes
> > whereas when describing the Evaluations you spoke about
> including/excluding paths.
>
> Oh, sorry... one major difference from the old traversal framework is
> that it returns nodes. The new framework returns paths leading from
> the star
ine an evaluator which takes the combination of
relationship types(without regard to order) and relationship properties to
return the desired path.
Can it be achievable in the current traversal framework?
REL1 REL2REL8
A -> X -> Y ---> Z
On Mon, Mar 14, 2011 at 3:17 PM, Mattias Persson
wrote:
> Could you describe a bit what kind of traversal you're doing?
I got nodes that describe a base of our organization, each nodes has
relationships with nodes that describe the network used in the base,
each network nodes has relat
On 2 June 2010 16:21, Mattias Persson wrote:
> I don't think the python bindings (or any other binding) has caught up
> to the new traversal framework. Uniqueness is all about when to visit
> a node and when not to. If the uniqueness would be NODE_GLOBAL a node
> wouldn'
Hi,
> Now that looks interesting! But why limit it to a pipe and not merge
> it with the Graph Matching component, so we can find non-linear
> subgraphs with the same API? Or did I misunderstand the concept?
Graph matching can be seen as a subset of graph traversal. Meaning,
s currently not available but
> probably interesting in a lot of settings. At least for you and me ;)
>
> Regards,
> Stephan
>
>
> On Wed, Apr 13, 2011 at 11:23, bhargav gunda
wrote:
>
>> Respected,
>>
>> I would to know that is there any method to c
Hi,
We looking into the options for sharding Neo4j. Using Gizzard (which is a
sharding framework from Twitter) seemed to be one of the possibilities. I
posting here so that everyone can evaluate this possibility and offer
suggestions. Did anyone else try sharding of Neo4j?
I have the following
ator(Evaluator)
-prune(PruneEvaluator)
-filter(Predicate)
Also I've added lots of useful evaluators in an "Evaluators" class, but
maybe those should reside in Traversal class instead, however I think
Traversal class is a little bloated as it is now.
There's the decision wh
rns an IndexHits that you can iterate
over or use getSingle() to retrieve a single matching node.
See also:
http://wiki.neo4j.org/content/Index_Framework
Other ways of accessing nodes in the db are getById() or traversal using the
traversal framework
or manual traversal starting from the refere
I like the pipes idea. What I would like to see is nested traversers. The
pipe example below seems to imply single hops at each step, but it would be
nicer to allow each step to traverse until it reached a certain criteria, at
which point a different traversal would take over.
In the old and
I don't think the python bindings (or any other binding) has caught up
to the new traversal framework. Uniqueness is all about when to visit
a node and when not to. If the uniqueness would be NODE_GLOBAL a node
wouldn't be visited more than once in a traversal. NODE_PATH means
that a nod
nation of
> relationship types(without regard to order) and relationship properties to
> return the desired path.
> Can it be achievable in the current traversal framework?
>
> REL1 REL2 REL8
> A -> X -> Y ---> Z
>
>
looking for?
>
> 2011/3/25 Wouter De Borger
>
> > Hi all,
> >
> > I would like to detect all cycles in a traversal.
> >
> > I know the traversal framework has cycle avoidance built-in, but there
> > does
only).
>
> I attached some screenshots from my current IMDB node space.
>
> I tried two different ways performing the traversal:
> 1. traverser framework
> 2. nested loops
> Both do have their pros and cons, I think.
>
> Any suggestions for improvements on the cod
, 2011 at 10:48, Mattias Persson
> wrote:
>
>> 2011/4/7 Michael Hunger :
>> > I think the confusing thing here is that ReturnableEvaluator talked about
>> including/excluding nodes
>> > whereas when describing the Evaluations you spoke about
>> including/ex
t of the traversal afterwards.
If you do define your own traversal system I would be very interested at
looking at your API (if I may) to see if there is some ideas that can be
used to improve the traversal API of Neo4j. Or if you just have suggestions
on what you think the traverser framework sho
you and me ;)
Regards,
Stephan
On Wed, Apr 13, 2011 at 11:23, bhargav gunda wrote:
> Respected,
>
> I would to know that is there any method to count the number of nodes and
> relationships traversed by the traversal framework.
> Like path.length() ---> which gives the depth
Hi Pere,
To sort you need to have all your results.
Thus, in Gremlin (and hopefully you can do the mapping to the core Neo4j
traverser framework),
results = []
g.v(1).out('friend').out('likes') >> results // what my friends like
results.sort{a,b -> a.name
gunda
> wrote:
>>
>>> Respected,
>>>
>>> I would to know that is there any method to count the number of nodes and
>>> relationships traversed by the traversal framework.
>>> Like path.length() ---> which gives the depth of the tree. So as like
tside your traversal description that for instance
> and Evaluator is updating since it is called for all traversed nodes. This
> is not thread safe but I think it will give you the data you want?
>
> Sent from my phone.
> On Apr 13, 2011 12:32 PM, "Stephan Hagemann" <
&g
Im enjoying Neo4J so far. The new Traversal framework has a lot of
potential. However, Id like to propose an extension to the
RelationshipExpander interface or have someone tell me of another way
to accomplish a task.
Here is an outline of the basics of my network:
Producer
tain criteria,
> at
> which point a different traversal would take over.
>
> In the old and current API's it seems to do this you need to create a
> traversal, iterate over it, and create a new traversal inside the loop.
>
> We created a Ruby DSL for nested traver
All,
(I am new to this list)
Looking at the Trarversal framework[1], I assumed that the
TraversalDescription.filter[2] worked similarly to
TraversalDescription.prune[3]. If any prune rejects a path, it is
rejected - similarly I expected, that if any filter excluded a path,
the path was excluded
d be worth a
lot to us in this matter.
The refactorings in the graph-algo component will to a large extent build on
the new traversal framework. Some algorithms will be possible to implement
using the new framework that were not possible to implement using the old
framework. This will greatly si
Hi,
> I've recently been trying to do some traversal that sort of can be
> described with transitions ie. if the last relationship was of type A
> and direction INCOMING, the next direction to go might be type A
> INCOMING or type B INCOMING; if it was type B INCOMING the nex
rty: relProp= "abc" in REL3
> >
> > I was not able to define an evaluator which takes the combination of
> > relationship types(without regard to order) and relationship properties
> to
> > return the desired path.
> > Can it be achievable in the current tr
There have been thoughts a long while to make something like this with the
traversal framework, but time has never been allocated to evolve it. I'm
adding stuff to the framework in a side track and will surely add some
aspect of composable traversers also.
2011/7/29 Niels Hoogeveen
>
&g
Hi!
Johan Svensson skrev:
One way would be to do a traversal from the "word-node" with the least
number for relationships.
OK, I implemented this. But I *do* have to iterate over the
relationships to get the count?
At the moment I only want the search to return one best match: e
2011/3/15 Craig Taverner
>
> > I like the pipes idea. What I would like to see is nested traversers. The
> > pipe example below seems to imply single hops at each step, but it would
> be
> > nicer to allow each step to traverse until it reached a certain criteria,
> > at
&
The DB would do it in memory too, wouldn't it? In the case of a complex
traversal, indexes don't really apply, since the ordering and the traversal
order are unrelated, so you'd generally need to sort in memory anyway. Whether
you do it as you add elements to the traversed lis
eturn paths containing cycles.
Something like this you're looking for?
2011/3/25 Wouter De Borger
> Hi all,
>
> I would like to detect all cycles in a traversal.
>
> I know the traversal framework has cycle avoidance built-in, but there
> doesn't seem to be
n the
> TraversalDescription,
> but it seems its not used by neo4j as a hint. Note that on a subsequent run
> of the same Traversal, its very quick indeed.
>
> Is there any way to use Indexing on relationships for such a scenario, to
> boost things up ?
>
> Ideally,
INCLUDE_AND_CONTINUE
> INCLUDE_AND_STOP
> SKIP_AND_CONTINUE
> SKIP_AND_STOP
>
> class TraversalDescription
> +evaluator(Evaluator)
> -prune(PruneEvaluator)
> -filter(Predicate)
>
> Also I've added lots of useful evaluators in an &q
Rodriguez wrote:
>
> > Hi Pere,
> >
> > To sort you need to have all your results.
> >
> > Thus, in Gremlin (and hopefully you can do the mapping to the core Neo4j
> > traverser framework),
> >
> > results = []
> > g.v(1).out('friend'
; > I was not able to define an evaluator which takes the combination of
> > relationship types(without regard to order) and relationship properties
> to
> > return the desired path.
> > Can it be achievable in the current traversal framework?
> >
> > REL1
You might also try to use cypher for your traversal which is able to order
(also in memory of course).
See the screencast I did: http://neo4j.vidcaster.com/U2Y/introduction-to-cypher/
It's even the same domain.
Cheers
Michael
Am 15.07.2011 um 17:24 schrieb Rick Bullotta:
> But you
Well, the thing is that the database can easy deal with that, as the
relational system do.
/ purbon
On 15 July 2011 17:08, Rick Bullotta wrote:
> The DB would do it in memory too, wouldn't it? In the case of a complex
> traversal, indexes don't really apply, since the
Traversal, its very quick indeed.
Is there any way to use Indexing on relationships for such a scenario, to
boost things up ?
Ideally, the Traversal framework could use automatic/declerative indexing on
Node Relationship types and/or direction to perform such traversals quicker.
Regards
Hi Tim!
Maybe you can use the new traversal framework, this interface comes to mind:
http://components.neo4j.org/neo4j-kernel/apidocs/org/neo4j/graphdb/traversal/SourceSelector.html
Regarding the number of relationships, it could be a good idea to store
it as a property on the node.
/anders
Hi,
I setup a traversal description with Uniqueness.NODE_PATH and the side
effect is duplicated nodes output.
How to filter the duplicated output in nodes and relationship under
your Transversal Framework?
Also, this link isn't working
http://components.neo4j.org/neo4j-kernel/apidocs/org/
There's no such statistics in the traversal framework, no. But your solution
with your own counter in the Evaluator would show you how many nodes was
encountered during the traversal (for the selected uniqueness setting).
2011/4/18 bhargav gunda
> Respected,
>
> here is the case w
Note that on a subsequent run
> of the same Traversal, its very quick indeed.
>
> Is there any way to use Indexing on relationships for such a scenario, to
> boost things up ?
>
> Ideally, the Traversal framework could use automatic/declerative indexing on
> Node
; own traversal sytem using the getRelationship(...)-methods of Node. Doing
> this will not slow down your system notably (given that you don't define
> complex algorithms in your traversals). It is sertenly very likely to be
> faster than filtering the result of the traversal afte
Hi Joshi,
the problem may be that your traversal description will traverse from
actor to director (in both directions) and also from director to
actors (also in both directions).
Your "manual" traverser traverses actors to directors in both
directions and then only incoming relation
27;m new and I don't
have background from Node.traverse(). If I understand correctly this
"will be" THE traversal framework right?
It's experimental but you use this from within Node.traverse so it's
not that experimental I guess? ... Did you suggest to use this or the
&quo
;> return false;
>> }
>> } ).traverse(...);
>>
>> This should (if it even compiles :) ) return paths containing cycles.
>> Something like this you're looking for?
>>
>> 2011/3/25 Wouter De Borger
>>
>> &g
ing to the core Neo4j
> traverser framework),
>
> results = []
> g.v(1).out('friend').out('likes') >> results // what my friends like
> results.sort{a,b -> a.name <=> b.name} // sort resultant vertices by name
>
> In short, once you have the result
directors (for the given Actor1). The traversal
description I wrote looks like :
Actor1 --> Director1 <-- Actor2
Actor1 --> Director2 <--Actor2
Actor1 --> Director3 <-- Actor2
Actor1 --> Director4 <-- Actor3
... and so on
for(Node otherActorNode : Traversal.des
ements and optimizations. As
mentioned we have not put much time into optimizing the RTree very much, so
hopefully there is room to move here.
- The search algorithm's known issues with not leveraging the Neo4j
traversal framework which is a very good, and high performance framework.
Peter
Craig Taverner
> >
> > > I like the pipes idea. What I would like to see is nested traversers.
> The
> > > pipe example below seems to imply single hops at each step, but it
> would
> > be
> > > nicer to allow each step to traverse until it reached a certa
ticket for this in the issue tracking system:
https://trac.neo4j.org/ticket/260
Cheers,
Tobias
On Mon, Sep 13, 2010 at 10:58 AM, Morten Barklund wrote:
> All,
>
> (I am new to this list)
>
> Looking at the Trarversal framework[1], I assumed that the
> TraversalDescript
Hi,
Just to be picky:
>> The easiest way to do that in this case is by adding:
>> .uniqueness(Uniqueness.NODE_PATH)
A co-creator's co-creator can be you. Thus, marko's co-creator's co-creator is
marko (amongst other people). In this case, unique on a path would not fail,
no? Can you do somethi
;) &&
position.lastRelationship().getProperty('timestamp') > '1530'"
}
About performance: if you need to do such a query very often, at least
I would do some indexing to make it possible to start the traversal as
close as possible. In general: find this kind of
; > Stephan
>> >
>> >
>> > On Wed, Apr 13, 2011 at 11:23, bhargav gunda
>> wrote:
>> >
>> >> Respected,
>> >>
>> >> I would to know that is there any method to count the number of nodes
>> and
>> >> relation
1 16:10, Marko Rodriguez wrote:
> > >
> > > > Hi Pere,
> > > >
> > > > To sort you need to have all your results.
> > > >
> > > > Thus, in Gremlin (and hopefully you can do the mapping to the core
> > Neo4j
> > > >
>
> > class TraversalDescription
> > +evaluator(Evaluator)
> > -prune(PruneEvaluator)
> > -filter(Predicate)
> >
> > Also I've added lots of useful evaluators in an "Evaluators" class, but
> > maybe those should reside
ingle directional
traversal
* It stops on the depth it finds the first hit on
Shortest path algo is implemented from scratch to be optimized for just
that, but allSimplePaths uses traversal framework which doesn't support
bidirectional traversals yet, although there have been some experiments
I would think that the graph structure definitely matters, in that there may be
optimizations that can be achieved via indexing/querying vs traversal and
sorting (or a hybrid of the two) depending on the specifics.
-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun
ne release. We're unable to
find the equivalent functionality with the new Traversal framework.
Thanks
Stephan
On Thu, Apr 7, 2011 at 09:35, Mattias Persson wrote:
> Sory, I meant
>
> INCLUDE_AND_PRUNE
>the path will be included in the result set, but the traversal
>w
Thank you Tobias. This "new" traversal framework looks much more powerful
and "fluent" then the traverser I have been playing with so far. The getting
started guide should definitively point to it.
Best regards,
James
2011/5/11 Tobias Ivarsson
> There is a tent
n the "implementation detail" warning light for me.
I'm working on refactoring the new traversal framework, so expect things to
change (and break) more. It's good that you report this though, since
examples should be updated to match the "best practices". The new traversal
API is
: Re: [Neo4j] Composable traversals
>
> Well, I've got none of those concerns really. Just the fact that
> TraversalDescription is viewed as "that other" traversal framework makes it
> slightly odd to use its interface in the core API. When it will be _the_
> framework, or
It works with graph-algo 0.6-SNAPSHOT and there's an AStar.java (which is
the "old" version) and one ExperimentalAStar.java which uses the new
traversal framework.
2010/6/23 Alex Averbuch
> Hi guys,
> thanks!
>
> I've pulled the latest java-astar-routing and look
s the new
> traversal framework.
>
> 2010/6/23 Alex Averbuch
>
> > Hi guys,
> > thanks!
> >
> > I've pulled the latest java-astar-routing and looking at it now.
> > Have changed to SNAPSHOT 0.6 too.
> >
> > Has the AStar algorithm been changed t
Hi,
I would like to fetch a ending portion of a path where the timestamp
of the relationship match. for example:
(Node 1)---<2pm>>(Node 3)---<3PM>--->(Node 4)<4PM>--->(Node 64)
from the above , I only want the subpath starting from Node 4 onward
for the timestamp greater than 3:30PM
H
1 - 100 of 305 matches
Mail list logo