How can I show all nodes and relationships in Data Browser tab?

What are sample index queries that I can type in in search field?

有帮助吗?

解决方案

There is a little help icon beside the search field, if you hoover over it it shows the syntax.

If a property of your nodes and relationships is indexed you can search for all of them like this.

node:index:indexname:fieldname:*
rels:index:indexname:fieldname:*

其他提示

You may also want to try a cypher query such as:

START n=node(*) RETURN n;

It's very obvious, and it will return all the existing nodes in the database.

EDIT : the following displays the nodes and the relationships :

START n=node(*) MATCH (n)-[r]->(m) RETURN n,r,m;

More simple way is

MATCH (n) RETURN (n)
MATCH (n) OPTIONAL MATCH (n)-[r]-() RETURN n, r;

You can show everything with simple MATCH (n) RETURN n, as offical documentation suggests.

START n=node(*) RETURN n from Neo4j 2.0 is deprecated:

The START clause should only be used when accessing legacy indexes (see Chapter 34, Legacy Indexing). In all other cases, use MATCH instead (see Section 10.1, “Match”).

Other good way for get ALL nodes (and nodes without relationship) :

MATCH (n) RETURN n UNION START n = rel(*) return n;

I found that this worked, retrieving all nodes including orphans, and all relationships:

MATCH (n) MATCH ()-[r]->() RETURN n, r
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top