简体   繁体   English

neo4j关系类型限制?

[英]neo4j relationship type limit?

I've created my graph with 38,000 relationship types, essentially shifting information out of properties and onto the relationship type. 我创建了具有38,000个关系类型的图,实际上是将信息从属性移到关系类型上。 I've done this because for my query speed, the .getProperties() functions was holding me back. 之所以这样做,是因为为了提高查询速度, .getProperties()函数使我.getProperties() But now when I attempt to run my query, I instead get this: 但是现在当我尝试运行查询时,我得到的是:

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)

I'm assuming this is related to the large number of relationship types I have, as before expanding to 38,000, I didn't have any problems. 我假设这与我拥有的大量关系类型有关,在扩展到38,000之前,我没有任何问题。 Is there any way to remedy this? 有什么办法可以解决这个问题? Is there a place where I can see the limitations of the Relationship Types for neo4j? 在哪里可以看到neo4j的关系类型的限制?

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

Maybe raise an issue to extend it and your use case? 也许提出一个扩展它和您的用例的问题? How many do you need? 你需要多少?

I believe storage wise the actual limit is 2^15-1 (=32767) types, not 2^16-1 (=65535). 我相信在存储方面,实际限制是2 ^ 15-1(= 32767)类型,而不是2 ^ 16-1(= 65535)类型。 There seems to be some invalid checks, making for a weird exception being thrown from Neo4j. 似乎有一些无效的检查,使得Neo4j抛出了一个奇怪的异常。

Since you need at least 100k you would still hit a problem. 由于您至少需要100k,您仍然会遇到问题。 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. 设置为可配置的(在商店创建时)最大支持的关系类型数量将非常有用,该设置会影响每个关系在磁盘上占用的空间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM