例如,在Dgraph 之旅的这一部分
# Define Directives and index
industry: string @index(term) .
boss_of: [uid] .
name: string @index(exact, term) .
works_for: [uid] .
例如,在Dgraph 之旅的这一部分
# Define Directives and index
industry: string @index(term) .
boss_of: [uid] .
name: string @index(exact, term) .
works_for: [uid] .
Schema 指令以 at 符号 ( @
) 开头,并且可以为谓词设置特殊行为。在您的示例中,有@index
设置索引类型的指令,例如exact
orterm
索引。
您可以在模式文档中了解模式中的其他指令,例如@reverse
设置反向边缘和@lang
使用人类语言感知字符串。