Reputation: 505
I have two nodes that belong to one of the two labels:Class or Method, as is encircled in yellow in the two images here. The cypher queries to look for Method labelled nodes are working properly in all cases. However, quite strangely, the cypher queries to return Class labelled nodes give empty results when using properties to select certain nodes.
In the image above, it can be seen that the query Match (n:Class{Cycles
:"52888"}) return n that is encircled in red, gives nothing, although such a node exist as is encircled in green. It is to be noted that a query for the Class nodes without the use of property runs fine.
The problem became even more confusing when similar query worked absolutely correctly for Method labelled nodes even with use of property to select certain nodes as is visible in the image below.
Can anyone explain why the Cypher queries are behaving differently with the Class labelled nodes and what is the solution to the problem.
Upvotes: 2
Views: 443
Reputation: 631
If the property of Cycles is Long, use the Query
MATCH (n:Class) WHERE n.Cycles = 52888 RETURN n
If the property of Cycles is String, use the Query
MATCH (n:Class) WHERE n.Cycles = "52888" RETURN n
Upvotes: 0
Reputation: 41676
Perhaps there is a space before or after the number?
Try
MATCH (n:Class) WHERE trim(n.Cycles) = "52888" RETURN n
Upvotes: 1