[Neo4j] getting non-deterministic results with getAllNodes()

2011-02-03 Thread Raghava Mutharaju
Hi all, I want to iterate over all the nodes in the graph and then do a tranversal on each of them. To do this, I used the getAllNodes() method of GraphDatabaseService class. But the number of nodes I get always varies on each run. I checked the number of nodes I created during graph creation

Re: [Neo4j] getting non-deterministic results with getAllNodes()

2011-02-03 Thread David Montag
Hi Raghava, Could you please provide the code used to create the store? Could you also please provide the code you use to iterate all nodes? The reference node always has id 0, so you can filter by ID to ensure that you don't process that node. David On Thu, Feb 3, 2011 at 10:41 AM, Raghava

Re: [Neo4j] getting non-deterministic results with getAllNodes()

2011-02-03 Thread Andreas Kollegger
Hi Raghava, Also, are you sure you're only creating the nodes once? Looking at your numbers, (7434-7021=413) happens to be true, though the other intervals don't match. Is this from a single run starting with a clean database (the db directory is empty)? -Andreas On Feb 3, 2011, at 7:51 PM,

Re: [Neo4j] getting non-deterministic results with getAllNodes()

2011-02-03 Thread Raghava Mutharaju
Hi David Andreas, Aah, I deleted the contents of the db and ran it, this time I got the expected result of 413 nodes. I was running the same program which creates traverses the graph multiple times, so the inconsistent results. Silly of me :) Thank you for pointing it out.

Re: [Neo4j] getting non-deterministic results with getAllNodes()

2011-02-03 Thread David Montag
Andreas' rain man style subtraction skills to the rescue :) Glad it worked out. Happy hacking! David On Thu, Feb 3, 2011 at 12:16 PM, Raghava Mutharaju m.vijayaragh...@gmail.com wrote: Hi David Andreas, Aah, I deleted the contents of the db and ran it, this time I got the expected