블로그를위한 전체 텍스트 검색을 위해 neo4j 색인을 사용하고 있습니다. 이후 findAllByQuery() 페이지 번호 매김을 위해 저장소 방법이 작동하지 않습니다. 나는 그것을 달성하기 위해 사이퍼 (skip/limit)를 사용하려고합니다.봄 데이터 neo4j 색인 검색
@Query("START blog=node:blogSearch({0}) RETURN blog ORDER BY blog.createDate DESC SKIP {1} LIMIT {2}")
Iterable<BlogGraph> findBlogsByQuery(String luceneExpression, int start, int offset);
매개 변수 : luceneExpression : "제목 : foo는"
하지만 몇 가지 문제가 발생합니다.
1 처음 시도 할 때 예외가 발생했습니다 findBlogsByQuery. 색인 "blogSearch"이 아직 생성되지 않았지만 만드는 방법은 무엇입니까? 내가 findAllByQuery() 저장소 방법을 사용하는 경우 나 문서에서 그것을 호출 할 때 첫 번째 인덱스가 생성됩니다 http://docs.spring.io/spring-data/neo4j/docs/2.0.0.RELEASE/reference/html/#d0e2031
Error executing statement START blog=node:blogSearch({0}) RETURN blog ORDER BY
blog.createDate DESC SKIP {1} LIMIT {2}; nested exception is
org.springframework.dao.InvalidDataAccessResourceUsageException: Error executing
statement START blog=node:blogSearch({0}) RETURN blog ORDER BY blog.createDate
DESC SKIP {1} LIMIT {2}; nested exception is org.neo4j.cypher.MissingIndexException:
Index `blogSearch` does not exist
2의가 있다고 가정 해 봅시다 인덱스 "블로그 검색"이미 생성 된 다른 문제 (NullPointException
매개 변수 : luceneExpression : 검색 텍스트 공간, 아래 등을 포함 할 경우)이 나온다 "제목 : foo는 foo는"하지만 난 볼 수 없어
이 일어날 때 사용 findAllByQuery() 저장소 방법
BlogGraph.java
@NodeEntity
public class BlogGraph {
@GraphId Long id;
@Indexed
long blogId;
@Indexed(indexName="blogSearch", indexType = IndexType.FULLTEXT)
String title;
...
는 어떤 도움을 주시면 감사하겠습니다.
모든 업데이트? –