I am beginning using Neo4j since 2 months. I have created a Neo4j graph and loaded it with 6M cities in it. My Graph store is about 6 gigs. Each city has 4 properties:
Name
Longitude
Latitude
Population
These nodes have a label City
,
I am trying to run some queries using the Neo4j browser. I have added an index:
CREATE INDEX ON :City(Name)
Now if I run a query looking for a specific name such as the following, then the result comes very fast:
MATCH (n:City)
WHERE n.Name = 'New York'
RETURN n
But when I just want to have the number of cities in the graph, an Unknown Error
rises and I can't get the number I am looking for:
MATCH (N:City)
RETURN COUNT(n)
or
MATCH (n:City)
WHERE n.Name =~ 'New.*'
RETURN COUNT(n)
Am I missing something here?
MATCH (N:City) RETURN COUNT(n)
first you use capitalN
then lowercasen
– Michael Hunger