Neo4j Spring Data示例缺少注释@Indexed [英] Neo4j Spring Data example missing annotation @Indexed
问题描述
尝试在 http://projects.spring.io/上运行neo4j spring数据示例spring-data-neo4j/
<dependencies>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
<version>4.1.2.RELEASE</version>
</dependency>
</dependencies>
还有
@NodeEntity
public class Movie {
@GraphId Long id;
@Indexed(type = FULLTEXT, indexName = "search")
String title;
Person director;
@RelatedTo(type="ACTS_IN", direction = INCOMING)
Set<Person> actors;
@RelatedToVia(type = "RATED")
Iterable<Rating> ratings;
@Query("start movie=node({self}) match
movie-->genre<--similar return similar")
Iterable<Movie> similarMovies;
}
,但<artifactId>spring-data-neo4j</artifactId>
中似乎不存在@Indexed(type = FULLTEXT, indexName = "search")
我是否需要在pom中添加其他内容?还是已弃用?如果是,我应该怎么做?
but the @Indexed(type = FULLTEXT, indexName = "search")
does not seem to exist in <artifactId>spring-data-neo4j</artifactId>
Do I have to add anything else to the pom ? or is this deprecated and if so how should I do it?
推荐答案
@Indexed
在SDN 3中存在,但在SDN 4中不再存在.您必须自己使用
@Indexed
was present in SDN 3, but not anymore in SDN 4. You have to manage indices and constraints yourself, using Cypher queries.
无耻的插件:您可以使用 Liquigraph 来管理您的迁移.
Shameless plug: you can use Liquigraph to manage your migrations.
这篇关于Neo4j Spring Data示例缺少注释@Indexed的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!