neo4j-contrib / neoclipse

Graph Database Tool
219 stars 136 forks source link

Show nodes without relationship with root node #28

Open tomasteicher opened 12 years ago

tomasteicher commented 12 years ago

When I connect to a database, I see root node by default. Then I can see nodes that have some relationship with root.

is it possible to browse nodes that have no index and no relationship (direct or through more nodes) to root node?

gtch commented 12 years ago

I agree — I was rather confused because I couldn't find any way to navigate or browse through all nodes and it seems like such obvious functionality. As far as I can tell, it's only possible to navigate via the root node.

I'd like to see the Cypher Editor window linked to the Database graph, so that you can (say) double-click a node in the query results to navigate to that in the database graph window. That way you can find a particular node for browsing without having to know its ID.

nrkkalyan commented 12 years ago

Hi,

Thanks for your comments. Will surly keep it my mind and will implement this feature if possible. I think we can keep this issue at a low priority.

jzelez commented 11 years ago

+1 This would be very helpful.

chuka-ononiwu commented 11 years ago

The Cypher query below returns all root nodes (ie, nodes with no incoming relationship) including the main root node. Aside from the (main) root node, all other nodes returned from this query has no relationship to the root node. With the node ids of the nodes returned, you can browse the nodes from the neo4j console. Hope it helps:

START n=node(*) MATCH n<-[r?]-parent WITH n, count(parent) AS parents WHERE parents = 0 RETURN n, parents;

The query ran in 2425ms against a database with 1.3 million nodes and 4.2 million relationships.