【问题标题】:What's a directive in Dgraph?Dgraph 中的指令是什么?
【发布时间】:2019-12-13 03:34:24
【问题描述】:

比如A Tour of Dgraph这个板块

# Define Directives and index

industry: string @index(term) .
boss_of: [uid] .
name: string @index(exact, term) .
works_for: [uid] .

【问题讨论】:

    标签: dgraph


    【解决方案1】:

    Schema 指令以 at 符号 (@) 开头,并且可以为谓词设置特殊行为。在您的示例中,有 @index 指令来设置索引类型,例如 exactterm 索引。

    您还可以在 schema docs 中了解架构中的其他指令,例如 @reverse 设置反向边缘和 @lang 使用人类语言感知字符串。

    【讨论】:

      猜你喜欢
      • 2018-03-26
      • 2020-12-10
      • 2012-12-02
      • 2012-12-30
      • 2019-06-20
      • 1970-01-01
      • 1970-01-01
      • 2014-02-21
      • 1970-01-01
      相关资源
      最近更新 更多