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 Craig Taverner
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 that would converge on a stable state. This means, if no new information is being added

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

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

2010-08-18 Thread Craig Taverner
Mmm we cannot limit the number of relationships in this app. One the most important features is that we'll keep looking for good matches for the user. Since the trimming algorithm will entirely delete low scoring relationships, the search algorithm will also keep finding them again, and if

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

2010-08-02 Thread David Montag
Alberto, Hope your testing is coming along well. Feel free to post your progress to the list! David On Wed, Jul 28, 2010 at 5:02 PM, Alberto Perdomo alberto.perd...@gmail.comwrote: Hi David, But then you need to store the result. You can store these metrics as relationships in neo4j,

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

2010-07-29 Thread Wouter De Borger
Hi, I have a proposal for a very different solution. First On Wed, Jul 28, 2010 at 6:36 PM, David Montag david.mon...@neotechnology.com wrote: Hi Alberto, On Wed, Jul 28, 2010 at 5:02 PM, Alberto Perdomo alberto.perd...@gmail.comwrote: Hi David, But then you need to store the

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

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

2010-07-28 Thread David Montag
Hi Alberto, Okay, interesting. You want to calculate some metric between pairs of users, so it's not a friend-of-a-friend scenario or anything like that, which would have been great in a graph db. This is just all/some pairs of random users. That you can do with your SQL db or neo4j or what ever

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-07-28 Thread Mattias Persson
One benefit you of Neo4j is that you can get rid of these pesky background jobs and instead calculate such things on the fly quite fast, and not needing to store that calculated info at all. Tried it? 2010/7/28, Alberto Perdomo alberto.perd...@gmail.com: Hi everyone, I would have an SQL db for

[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-27 Thread Niels Hoogeveen
Is it possible to encode the absence of a relationship with a relationship in your application? Date: Tue, 27 Jul 2010 18:52:10 +0100 From: alberto.perd...@gmail.com To: user@lists.neo4j.org Subject: [Neo4j] Querying for nodes that have no relationhip to a specfic node Hi, I'm

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

2010-07-27 Thread Vitor De Mario
If this is feasible in Alberto's application, you have to consider that you will be creating a complete graph, and for such a graph with n nodes, you'll have O(n^2) relationships. This can grow really, really fast. Besides, it would turn the insertion of a new node into a potentially slow

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

2010-07-27 Thread rick.bullotta
Sounds like a pretty easy SQL query, though. ;-) Actually the random sampling aspect definitely throws a complication into the requirements. I can't even picture how to achieve that in Neo without first obtain some (large) set of nodes and using a randomizer to select from the