使用 JanusGraph 进行直接索引查询

Direct Index Queries with JanusGraph

我想尝试使用直接索引查询将我的模糊匹配查询直接发送到我的 elasticsearch 后端。但是,到目前为止,我还无法使这种类型的查询正常工作。

这是我正在尝试的查询 运行:

g.indexQuery("displayNameMixed", "v.displayName:(ocean)").vertices()

其中 displayNameMixed 是 Jansugraph 中索引的名称,displayName 是数据库中的节点属性(ocean 是我要搜索的词)。

这是我在 运行 查询时得到的响应:

No signature of method: org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource.indexQuery() is applicable for argument types: (String, String) values: [displayNameMixed, v.displayName:(ocean)]

我正在搜索的节点类型称为 JournalFixed。在elasticsearch集群中,索引被称为janusgraph_displaynamemixed.

我正在使用的说明在这里:JanusGraph Manual Page

如果您需要有关我的图模型或 Janusgraph 安装的更多详细信息,请在评论中告诉我。

g 是您的图形遍历源,您应该改用 graph.indexQuery()