"After further review..." (an American football saying we're becoming all too familiar with)...there is a "hasRelationship()" method on Node that returns a boolean indicating if the Node has any relationships or not...thus an "orphan" node would return false.
-----Original Message----- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Tim Langley Sent: Saturday, January 16, 2010 8:04 PM To: Neo user discussions Subject: Re: [Neo] Quick question on finding orphaned nodes That would be VERY VERY useful :) if there was a trivial way to implement this one of the key use-cases for me is to count the number of relationships T On 17 Jan 2010, at 01:01, Rick Bullotta wrote: > Since there are some cases where what might be considered "orphan" > nodes are > perfectly normal use cases (a node with no relationships), I think > the only > way is to iterate through all nodes and check to see if > relationships exist. > > Here's a broader question: > > Does Neo maintain an in-memory list of relationships for a given > node? If > so, could the # of relationships be exposed somehow as a property of > the > node? > > If so, you could conceivably use a Lucene index on the # of > relationships > and quickly find all nodes with no relationships. > > > -----Original Message----- > From: user-boun...@lists.neo4j.org [mailto:user- > boun...@lists.neo4j.org] On > Behalf Of Zerony Zhao > Sent: Saturday, January 16, 2010 12:49 PM > To: Neo user discussions > Subject: [Neo] Quick question on finding orphaned nodes > > Hi Neo4j users, > > Is there a shortcut to find the orphaned nodes on in graph? > Currently the > program uses a loop to check each nodes in the graph to find it is > orphaned > or not. Thanks. > > Zerony > _______________________________________________ > Neo mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > > _______________________________________________ > Neo mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user Tel: +44 7989 539363 Email: t...@timlangley.me.uk Web: http://www.linkedin.com/in/langleytim _______________________________________________ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user