For example, in this section of A Tour of Dgraph
# Define Directives and index
industry: string @index(term) .
boss_of: [uid] .
name: string @index(exact, term) .
works_for: [uid] .
For example, in this section of A Tour of Dgraph
# Define Directives and index
industry: string @index(term) .
boss_of: [uid] .
name: string @index(exact, term) .
works_for: [uid] .
Schema directives start with an at-sign (@
) and can set special behavior for the predicate. In your example, there's the @index
directive to set the index types like the exact
or term
index.
There are also other directives in the schema that you can learn about in the schema docs, such as @reverse
to set reverse edges and @lang
to use human-language aware strings.