【发布时间】: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
比如A Tour of Dgraph这个板块
# Define Directives and index
industry: string @index(term) .
boss_of: [uid] .
name: string @index(exact, term) .
works_for: [uid] .
【问题讨论】:
标签: dgraph
Schema 指令以 at 符号 (@) 开头,并且可以为谓词设置特殊行为。在您的示例中,有 @index 指令来设置索引类型,例如 exact 或 term 索引。
您还可以在 schema docs 中了解架构中的其他指令,例如 @reverse 设置反向边缘和 @lang 使用人类语言感知字符串。
【讨论】: