I am building a social network like graph where we periodically would like to find all the nodes with an incoming count of greater than 2. E.g.
A->B C->B C->A D->A E->A
Should return node A.
I am new to neo4j and am still a bit confused about whether they will search through all the available rows. Is there an index I can use to optimize these queries? My search query is like this
EXPLAIN MATCH ()-[r:F]->(b:Person) WITH b, count(r) AS count WHERE count > 1 RETURN collect(b.username)