Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-08-2018 01:37 AM
Hello,
I found there is a flaw of apoc procedure call apoc.meta.data()
.
I used the example dataset:
cineasts_12k_movies_50k_actors.tgz (14MB).
When I execute call apoc.meta.data()
,
match (x:User)-[r:RATED]->(y:Movie) where labels(x)=["User"] return r
, the result is (no changes, no records)
.match (x:User)-[r:RATED]->(y:Movie) return labels(x),r
, there are many results like:
labels(x) | r |
---|---|
["Person", "User"] | { "stars": 5 } |
Hence, there are two labels of the source in the "RATED" relationship.
Then, I execute match (x:User)-[r:RATED]->(y:Movie) where labels(x)=["Person","User"] return r
, the result is correct.
But when I execute match (x:User)-[r:RATED]->(y:Movie) where labels(x)=["User","Person"] return r
, the result is (no changes, no records)
.
Hence, there are mainly two problems of my post:
call apoc.meta.data()
procedure not provide full labels of the source in the relationship "RATED"?where
clause?09-08-2018 02:27 AM
What you call full labels is a combination of labels.
apoc.meta.data()
only looks at individual labels.
We could add a column that lists "other labels", please raise a GH issue on the apoc repository.
Btw. you should use WHERE x:User
for a faster query.
All the sessions of the conference are now available online