【问题标题】:JanusGraph Indexes used only for lookup entry elements?JanusGraph 索引仅用于查找条目元素?
【发布时间】:2017-10-04 02:36:06
【问题描述】:

我不清楚 JanusGraph(0.1.1 或即将推出的 0.2.0)索引行为。

所有索引(复合索引、混合索引和顶点中心索引)仅用于查找入口点元素?

例如,在下面的遍历中,索引仅在has('Lang', 'name', 'python') 处使用?

g.V().has('Lang', 'name', 'python').in('use').has('person', 'age', P.gt(28)).toList()

如果是这样,当一个中间顶点有这么多边(超级节点)时,JanusGraph 必须从后端存储中读取这么多元素才能过滤?

【问题讨论】:

    标签: gremlin tinkerpop tinkerpop3 janusgraph


    【解决方案1】:

    在初始查找之后,您只能利用vertex centric indexes 来提高遍历性能。例如,您可以复制此人的年龄属性(也可以将其存储在 use 边缘并在此属性上创建 VCI)。

    mgmt.buildEdgeIndex(uses, "usedByAge", Direction.IN, Order.incr, age);
    

    【讨论】:

    • 谢谢!我必须制作以顶点为中心的索引。
    猜你喜欢
    • 2012-11-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-13
    • 2021-07-02
    • 2017-09-23
    • 2015-05-07
    相关资源
    最近更新 更多