[Neo4j] Querying for nodes that have no relationhip to a specfic node

2010-07-27 Thread Alberto Perdomo
Hi, I'm considering using neo4j for a current project I'm working on. I need to do the following periodically (e.g. daily): * step 1: for every node, let's call it A, I need to pick n other nodes randomly that fullfill certain attributes and have no relationship to A. * step2: For each of those

Re: [Neo4j] Querying for nodes that have no relationhip to a specfic node

2010-07-28 Thread Alberto Perdomo
Hi everyone, I would have an SQL db for the app besides the graph db. I have users that I would store as nodes within the graph besides storing them in SQL as well. Within those nodes I store attributes like male/female, age or date of birth, etc. I would have one kind of relationship for

Re: [Neo4j] Querying for nodes that have no relationhip to a specfic node

2010-07-28 Thread Alberto Perdomo
Hi David, But then you need to store the result. You can store these metrics as relationships in neo4j, and then just update them for each user when you recompute. You can find the user nodes via indexing. Maybe it's acceptable that some metrics are out of date, so you can just background

Re: [Neo4j] Querying for nodes that have no relationhip to a specfic node

2010-08-18 Thread Alberto Perdomo
Hi, unfortunately I had to step aside from this subject for some days and now I'm trying to catch up with all your suggestions. On Wed, Jul 28, 2010 at 12:51 AM, Niels Hoogeveen pd_aficion...@hotmail.com wrote: Is it possible to encode the absence of a relationship with a relationship in

Re: [Neo4j] Querying for nodes that have no relationhip to a specfic node

2010-08-18 Thread Alberto Perdomo
Hi Craig, On Thu, Jul 29, 2010 at 12:14 PM, Craig Taverner cr...@amanzi.com wrote: I think leveraging existing relationships is obviously valuable, but I thought I'd throw in an idea for doing the original suggestion, pure random search: Sounds interesting. I think the way to go is to

Re: [Neo4j] Querying for nodes that have no relationhip to a specfic node

2010-08-18 Thread Alberto Perdomo
Hi David, On Mon, Aug 2, 2010 at 11:35 AM, David Montag david.mon...@neotechnology.com wrote: Alberto, Hope your testing is coming along well. Feel free to post your progress to the list! David Unfortunately I had to leave this subject on the side for some days and now I'm catching up. I

Re: [Neo4j] Querying for nodes that have no relationhip to a specfic node

2010-08-18 Thread Alberto Perdomo
Hi Craig, On Wed, Aug 18, 2010 at 11:15 AM, Craig Taverner cr...@amanzi.com wrote: Limit meaning in this run? Or at all times? The first is ok, the second not. I guess you mean exiting after I have computed already 10 new relationships right? Well, actually I was aiming for an algorithm