【问题标题】:Full Text indexing in Neo4j with Spring Data Neo4j 3.2.0使用 Spring Data Neo4j 3.2.0 在 Neo4j 中进行全文索引
【发布时间】:2015-02-13 10:37:40
【问题描述】:

我们需要使用 Spring Data Neo4j 在 Neo4j 数据库中进行全文索引。其实我正在从那个链接学习http://neo4j.com/docs/milestone/indexing-create-advanced.html

但现在它的方法已被弃用。 我从这里了解更多关于它的信息http://docs.spring.io/autorepo/docs/spring-data-neo4j/3.2.0.M1/reference/pdf/spring-data-neo4j-reference.pdf .我很困惑该怎么做。 Michael Hunger 昨天告诉我们关于该问题How to filters data at node level in Neo4j Cypher 的索引。 我们在域级别进行索引

@Indexed(indexName = "people-search", indexType=IndexType.FULLTEXT) String username

请详细说明

【问题讨论】:

  • 全文索引仍需通过手动索引完成,对模式索引的全面支持将在 Neo4j 的更高版本中提供。所以你做对了

标签: neo4j spring-data-neo4j


【解决方案1】:

我们得到了解决方案

@Indexed(indexName = "peopleSearch", indexType=IndexType.FULLTEXT)
     String postText

 @Indexed(indexName = "peopleSearch", indexType=IndexType.FULLTEXT) String username

然后在 Cypher 中我们使用

START item=node:peopleSearch("postText:v* OR username:*a")
 return id(item) ,labels(item)

如果您有更好的方法,请提供给我们。谢谢

【讨论】:

    猜你喜欢
    • 2017-10-11
    • 1970-01-01
    • 2014-05-30
    • 2012-11-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-12-23
    • 2015-11-20
    相关资源
    最近更新 更多