thanks Max, that is exactly what I want
On Tuesday, April 4, 2017 at 10:03:25 PM UTC-7, Max De Marzi Jr. wrote:
>
> Oh yeah. We keep track of them.
> You can use SIZE((node)-[:reltype]->()) in Cypher.
>
> MATCH (n:User {id:'max'})
> RETURN SIZE((n)--()) AS all, SIZE((n)-->()) AS out, SIZE((n)<--()) AS in,
> SIZE((n)-[:FRIENDS]-()) AS allType, SIZE((n)-[:FRIENDS]->()) AS outType,
> SIZE((n)<-[:FRIENDS]-()) AS inType
>
> In Java you have node::getDegree(). See
> https://maxdemarzi.com/2017/04/04/building-a-twitter-clone-with-neo4j-part-three/
>
> for example of using it.
>
> On Monday, April 3, 2017 at 8:41:12 PM UTC-5, Zhixuan Wang wrote:
>>
>> I found my query always got stuck at expanding some messy nodes with
>> hundreds of indegrees. I am wondering if on each node we have some hidden
>> property that tells the number of degrees of that node?
>>
>> I believe with the concept of "index free adjacency" there should be a
>> way of knowing the node degrees without actually going out to read every
>> node it is connected to.
>>
>> Any comments/suggestions would be greatly appreciated.
>>
>> Thanks,
>>
>>
--
You received this message because you are subscribed to the Google Groups
"Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.