Finding the Centrality(Most Central Node) in Neo4J

1,039 views
Skip to first unread message

dharmendra pratap singh

unread,
Apr 2, 2013, 2:59:14 AM4/2/13
to ne...@googlegroups.com
Hi All,
Can anyone recommend me how can i find the most central node which is present in my Neo4J graph Database.

Thanks in Advance


Regards
DP

Peter Neubauer

unread,
Apr 2, 2013, 6:18:29 AM4/2/13
to Neo4j User
Well,
depends on the size. For a small graph, just use cypher

http://console.neo4j.org/r/ouhhxv

start n=node(*)
match n-[r]-m
return n, count(r) as degree
order by degree desc;

/peter

Cheers,

/peter neubauer

G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer

The authoritative book on graph databases - http://graphdatabases.com
Neo4j questions? Please use SO - http://stackoverflow.com/search?q=neo4j
> --
> 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 neo4j+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

dharmendra pratap singh

unread,
Apr 2, 2013, 7:35:18 AM4/2/13
to ne...@googlegroups.com
Hi Peter,
Thanks For Your Reply !!

My graph db is not small it is having more than 10k Nodes. and and lacs of relationships. so could you guide me how can i overcome this situation.
Whether I have to go for Gremlin or can we handle it from Cypher Query or We have to go for Neo4J API'S.

I have to take the measure of all the matrices present in Neo4J graph DB like CENTRALITY/CLOSENESS/BETWEENESS/DEGREE etc.


Thanks In Advance.

Regards DP

Peter Neubauer

unread,
Apr 2, 2013, 8:06:01 AM4/2/13
to Neo4j User
Dharmendra,
fro 10k nodes, I would use Cypher, for the rest, check out the
implementations in
https://github.com/neo4j/neo4j/tree/master/community/graph-algo/src/main/java/org/neo4j/graphalgo/impl
and use it from Java.

/peter

Cheers,

/peter neubauer

G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer

The authoritative book on graph databases - http://graphdatabases.com
Neo4j questions? Please use SO - http://stackoverflow.com/search?q=neo4j


On Tue, Apr 2, 2013 at 1:35 PM, dharmendra pratap singh
Reply all
Reply to author
Forward
0 new messages