【问题标题】:How to add index to label in DSE graph?如何在 DSE 图中为标签添加索引?
【发布时间】:2018-04-25 16:22:28
【问题描述】:

我关闭了 dse 图的自动扫描并为顶点和边的属性添加索引。我的所有查询都失败并显示以下错误消息,

g.V().hasLabel("PERMISSIONS").valueMap()

产量,

Could not find an index on vertices labelled 'PERMISSIONS' to answer the condition: '((label = PERMISSIONS))'. Current indexes are: byName(Secondary)->name. Alternatively if in development enable graph scan by using graph.allow_scan. Graph scan is NOT suitable for anything other than toy graphs.

如何为标签添加索引?

【问题讨论】:

    标签: datastax datastax-enterprise-graph


    【解决方案1】:

    文档中有一个关于索引的部分,它将向您展示如何创建索引 - http://docs.datastax.com/en/dse/5.1/dse-dev/datastax_enterprise/graph/using/indexingTOC.html

    看起来您正在尝试返回权限顶点标签的所有数据。这将导致集群扫描。您是否能够按属性过滤查询,而不是尝试返回所有数据?

    【讨论】:

    • 数据集如果顶点是固定的所以没有过滤器。
    猜你喜欢
    • 2017-05-25
    • 2017-07-11
    • 2012-07-11
    • 2014-04-26
    • 2018-07-24
    • 1970-01-01
    • 2013-04-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多