Neo4j cypher query to focus a node amongst the other nodes

Hi,

I want to know is there a query where when i do

    MATCH (n)-[r]->(m) RETURN n,r,m 

will return a set of all 125 nodes present in the database. Now here i want to generate a query where when i search a particular node amongst all the 125 nodes, it comes to focus or the centre of the neo4j.

Or probably if you can suggest an idea to get such an output.

You can certainly filter your queries by any label or property value in the graph. You can do so by adding a "WHERE" clause to your query. For example:

MATCH (n)-[r]->(m) where n.foo = 'xxx' return n, r, m

The online training course, Introduction to Neo4j has a lesson on getting more out of Cypher. You should take a look at this free training course.

Elaine Rosenberg

1 Like

Thank you elaine ! I have been using this query for a while but it did not occur to me in this question. I shall take some time off and do the neo4j course. thanks