自从RC1更新为RELEASE以来,我遇到了以下异常:
org.springframework.data.mapping.model.MappingException: No index name allowed on label based indexes这意味着 @Index 现在将默认为标签",而不是简单索引".
如何为每个 @NodeEntity 指定标签? 通过此链接,我认为我应该使用 @Labels 但是这是官方吗?
考虑问题 DATAGRAPH-433 唯一索引会使用旧索引策略吗?
spring数据neo4j文档没有提供任何线索.
解决方案您可以从@Indexed批注中删除indexName.
或者为旧索引添加@Indexed(indexType = IndexType.SIMPLE).
您还必须手动为唯一索引设置该值.我有一篇针对SDN 3.0的博客文章.明天出版.
Since I updated from RC1 to RELEASE I get this exception:
org.springframework.data.mapping.model.MappingException: No index name allowed on label based indexeswhich means @Index will now default to Label and not Simple indexing.
How do I specify the labels for each @NodeEntity ? From this link I think I should use @Labels but is this official ?
Considering issue DATAGRAPH-433 will unique indexes use the old index strategy?
The spring data neo4j documentation doesn't offer any clue.
解决方案You can either just remove the indexName from your @Indexed annotations.
Or you add @Indexed(indexType = IndexType.SIMPLE) for the old indexes.
You have to manually set that for unique indexes too. I have a blog post in writing for SDN 3.0. To be published some time tomorrow.
更多推荐
SDN neo4j 3.0发布索引策略
发布评论