简体   繁体   English

Neo4j Java api无法通过关系类型中的全文索引获取关系

[英]Neo4j Java api cannot get relationship by full-text index in relationship types

I want to count the relationships by type in Neo4j using neo4j native java Api (not execute Cyper statement)我想使用neo4j原生java Api(不执行Cyper语句)在Neo4j中按类型计算关系

I create a full-text index in relationships by calling procedure我通过调用过程在关系中创建全文索引

CALL db.index.fulltext.createRelationshipIndex(
  "dependsTypeRelationshipIndex",
  ["DEPENDS"], ["isoptional"], 
  { analyzer: "standard", eventually_consistent: "true" })

The index has been created suffcessfully :索引已成功创建: 在此处输入图片说明

Also, there are existing correspondingly relationships :此外,还存在相应的关系: 在此处输入图片说明

However, when I using neo4j native api, it does not work.但是,当我使用 neo4j 本机 api 时,它不起作用。 在此处输入图片说明

Is there any config I need to set, or method to count the relationships by type without using Cypher?是否需要设置任何配置,或在不使用 Cypher 的情况下按类型计算关系的方法?

In neo4j 3.5.*, for the relationship, there are two types of index, explicit index and full-text index.在neo4j 3.5.*中,对于关系,有两种索引,显式索引和全文索引。 However, in the neo4j java native API, there is only an index manager for the explicit index, which is the reason I can't get my full-text index.但是,在neo4j java native API中,只有显式索引的索引管理器,这就是我无法获取全文索引的原因。 So I can only query the full-text index by using the Cypher statement which is a conflict to my condition.所以我只能使用与我的条件冲突的Cypher语句来查询全文索引。

I hope there will be an index manager for the full-text index in the future neo4j java native API.希望未来的neo4j java native API中会有全文索引的索引管理器。

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

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