Dgraph DQL Tour
Basic
Language Support
Dgraph supports string text and queries as UTF-8.
String valued predicates can be annotated with a language tag.
Amit’s name was stored in English "Amit"@en
, Hindi "अमित"@hi
and Bengali
"অমিত"@bn
. Michael’s was stored in English. Artyom’s was stored in English and
Russian "Артём"@ru
. Sang Hyun’s was stored in English and Korean "상현"@ko
.
Queries can search over text in the tagged languages by specifying which
language to search and which languages to return. The syntax @lang1:...:langN
specifies the preference order for returned languages with the following rules:
- at most one result will be returned
- if results exists in the preferred languages, the left most (in the preference list) of these is returned
- if no result exists in the preferred languages no result is returned unless
the preference list is terminated with
.
, in which case the value without a specified language is returned, or if there is no value without language, a value in “some” language is returned.
Try changing [email protected]:ru
to [email protected]:ru:.
to find the missing friend’s name.