我关闭了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.
如何为lable添加索引?
答案 0 :(得分:0)
文档中有一个关于索引的部分,它将向您展示如何创建索引 - http://docs.datastax.com/en/dse/5.1/dse-dev/datastax_enterprise/graph/using/indexingTOC.html
看起来您正在尝试返回权限顶点标签的所有数据。这将导致群集扫描。您是否能够通过属性过滤查询,而不是尝试返回所有数据?