Neo4j cypher不在标签上过滤

时间:2014-12-20 20:31:53

标签: java neo4j cypher

我在Neo4j中有一些让我感到困惑的行为。我有一个用Java创建的小型嵌入式网络。以下cypher查询说明了问题。

neo4j-sh (?)$ match (n) return n._id,labels(n);
+------------------------------------------------------------------------------------------------------------+
| n._id                                                                        | labels(n)                   |
+------------------------------------------------------------------------------------------------------------+
| "/Users/simonshapiro/NetBeansProjects/XMLTest/src/xmltest/media/project.xml" | ["IdentityNode","Pedigree"] |
| <null>                                                                       | ["StateNode"]               |
| <null>                                                                       | ["StateNode"]               |
| "iqaS5pKAUBxk5wOW"                                                           | ["IdentityNode","MetaNode"] |
| <null>                                                                       | ["StateNode"]               |
| "2ahS5pKAUBxk5wOv"                                                           | ["IdentityNode","MetaNode"] |
| <null>                                                                       | ["StateNode"]               |
| "N3jS5pKAUBxk5wPJ"                                                           | ["IdentityNode","MetaNode"] |
| <null>                                                                       | ["StateNode"]               |
| "btoC1pKAUBxk5wQu"                                                           | ["IdentityNode","MetaNode"] |
| <null>                                                                       | ["StateNode"]               |
+------------------------------------------------------------------------------------------------------------+

但是尝试在标签上过滤如下所示不会产生任何结果。

neo4j-sh (?)$ match (n:MetaNode) return n._id,labels(n);                  
+-------------------+
| n._id | labels(n) |
+-------------------+
+-------------------+
0 row
9 ms

0 个答案:

没有答案