1

我创建了包含 38,000 种关系类型的图表,基本上将信息从属性转移到关系类型上。我这样做是因为对于我的查询速度,这些.getProperties()功能阻碍了我。但是现在当我尝试运行我的查询时,我得到了这个:

java.lang.NullPointerException
    at org.neo4j.kernel.impl.core.NodeManager.receiveRelationships(NodeManager.java:658)
    at org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:624)
    at org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:400)
    at org.neo4j.kernel.impl.core.NodeImpl.loadInitialRelationships(NodeImpl.java:352)
    at org.neo4j.kernel.impl.core.NodeImpl.ensureRelationshipMapNotNull(NodeImpl.java:338)
    at org.neo4j.kernel.impl.core.NodeImpl.getAllRelationshipsOfType(NodeImpl.java:184)
    at org.neo4j.kernel.impl.core.NodeImpl.getRelationships(NodeImpl.java:269)
    at org.neo4j.kernel.impl.core.NodeProxy.getRelationships(NodeProxy.java:114)

我假设这与我拥有的大量关系类型有关,在扩展到 38,000 之前,我没有任何问题。有没有办法解决这个问题?有没有地方可以看到 neo4j 的关系类型的限制?

4

2 回答 2

1

是的,这可能是正确的,请参阅http://docs.neo4j.org/chunked/snapshot/capabilities-capacity.html#capabilities-data

也许提出一个问题来扩展它和你的用例?你需要多少?

于 2012-08-25T20:36:35.010 回答
0

I believe storage wise the actual limit is 2^15-1 (=32767) types, not 2^16-1 (=65535). There seems to be some invalid checks, making for a weird exception being thrown from Neo4j.

Since you need at least 100k you would still hit a problem. Would be great with a configurable (at store creation) max number of relationship types supported, a setting that would affect the space each relationship will take on disk.

于 2012-08-27T07:22:29.867 回答