Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-20-2019 06:19 AM
Hi !
I am currently trying to show via Neo4j Browser
all nodes with a specific Label (Here named "Label1"), when each of them have at least one connection with 3 specific labelled nodes ("X","Y","Z"). I've tried the following query:
MATCH (a)-->(b)
where a:Label1
and size((a)-->(b)) >= 1
and b:X
and b:Y
and b:Z
RETURN a,b, size((a)-->(b)) AS count
However, it returns me everything instead of only nodes with these labels. Did I made something wrong here ?
I've also Tried to exclude nodes with labels I don't want to see, like:
and not b:LabelX
But they still appear.
Thank you 🙂
Solved! Go to Solution.
09-23-2019 12:23 AM
There is the answer coming from Stackoverflow website:
MATCH (a:Label1)
WHERE (a)-->(:X)
AND (a)-->(:Y)
AND (a)-->(:Z)
RETURN a
Thank you anyway
09-20-2019 07:31 AM
In Neo4j Browser, you must turn off "connect result nodes" in settings on the left.
Elaine
09-20-2019 08:22 AM
Hum, now I have nothing returned... However I know that it should return something. Also, I've removed some labels on the filter, and I still have nothing once I turned off "connect result nodes"
09-20-2019 10:58 AM
count() is a value so the results are returned in tabular format only. If you were to not return count(), then you should be able to see the visualization of the graph with just what you asked to be returned. That is, you should return either paths or nodes and relationships.
Elaine
09-23-2019 12:23 AM
There is the answer coming from Stackoverflow website:
MATCH (a:Label1)
WHERE (a)-->(:X)
AND (a)-->(:Y)
AND (a)-->(:Z)
RETURN a
Thank you anyway
All the sessions of the conference are now available online