I am completely new to Neo4j. The current graph version is 4.0.1 Enterprise. The issue being faced by me is that of cypher query.
The data can be viewed using the following link
Below are some screenshots that help understand the data.
call db.schema.visualization()
one Person above can be linked only to one type.
This image shows the person count per type.
This is the part where I am facing the issue
MATCH (p1:PERSON)<-- (:TYPE{name:"t1"})
MATCH (P2:PERSON)<-- (:TYPE{name:"t2"})
RETURN COUNT(p1), COUNT(P2)
Here I get the result as 1786(38*47) for both the counts. I need the first column to have value 38 and the other to have 47.
P.S.: This is a dummy problem recreated to mimic a real-world situation of creating a self-join of one person with another from the other type. The CSV load is taking too much time thus even though that is a simpler way the computation time is so much that the desktop is not able to process it even though I have set heap space of 8GB space.
Thanks in advance for the help.