【问题标题】:Direct Index Queries with JanusGraph使用 JanusGraph 的直接索引查询
【发布时间】:2020-12-09 15:41:54
【问题描述】:

我想尝试直接索引查询,将模糊匹配查询直接发送到我的 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 安装的更多详细信息,请在 cmets 中告诉我。

【问题讨论】:

    标签: elasticsearch gremlin janusgraph


    【解决方案1】:

    g 是你的graphtraversalsource,你应该改用graph.indexQuery()

    【讨论】:

    • 太好了,感谢您的澄清。我只是将g 换成了我的图形名称。我意识到这是一个单独的问题,但我可以从这种类型的查询中获取顶点属性吗?
    猜你喜欢
    • 2018-02-10
    • 2019-02-14
    • 2018-07-14
    • 2021-12-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-20
    • 1970-01-01
    相关资源
    最近更新 更多