diff --git a/contrib/integration/testtxn/main_test.go b/contrib/integration/testtxn/main_test.go index 586cafe79b3..1690815777f 100644 --- a/contrib/integration/testtxn/main_test.go +++ b/contrib/integration/testtxn/main_test.go @@ -509,7 +509,7 @@ func TestFriendList(t *testing.T) { op = &api.Operation{} op.Schema = ` - friend: uid @reverse .` + friend: [uid] @reverse .` if err := s.dg.Alter(context.Background(), op); err != nil { log.Fatal(err) } diff --git a/dgraph/cmd/bulk/speed_tests/run.sh b/dgraph/cmd/bulk/speed_tests/run.sh index 51fb5b10fdc..dc600ec64c7 100755 --- a/dgraph/cmd/bulk/speed_tests/run.sh +++ b/dgraph/cmd/bulk/speed_tests/run.sh @@ -42,11 +42,11 @@ echo " 1 million data set " echo "=========================" run_test ' -director.film: uid @reverse @count . -genre: uid @reverse . +director.film: [uid] @reverse @count . +genre: [uid] @reverse . initial_release_date: dateTime @index(year) . name: string @index(term) . -starring: uid @count . +starring: [uid] @count . ' 1million.rdf.gz echo "=========================" @@ -54,15 +54,15 @@ echo " 21 million data set " echo "=========================" run_test ' -director.film : uid @reverse @count . -actor.film : uid @count . -genre : uid @reverse @count . +director.film : [uid] @reverse @count . +actor.film : [uid] @count . +genre : [uid] @reverse @count . initial_release_date : datetime @index(year) . -rating : uid @reverse . -country : uid @reverse . +rating : [uid] @reverse . +country : [uid] @reverse . loc : geo @index(geo) . name : string @index(hash, fulltext, trigram) . -starring : uid @count . +starring : [uid] @count . _share_hash_ : string @index(exact) . ' 21million.rdf.gz @@ -82,18 +82,18 @@ Text: string @index(fulltext) . Tag.Text: string @index(hash) . Type: string @index(exact) . ViewCount: int @index(int) . -Vote: uid @reverse . -Title: uid @reverse . +Vote: [uid] @reverse . +Title: [uid] @reverse . Body: uid @reverse . Post: uid @reverse . PostCount: int @index(int) . -Tags: uid @reverse . +Tags: [uid] @reverse . Timestamp: datetime . GitHubID: string @index(hash) . -Has.Answer: uid @reverse @count . +Has.Answer: [uid] @reverse @count . Chosen.Answer: uid @count . -Comment: uid @reverse . -Upvote: uid @reverse . -Downvote: uid @reverse . -Tag: uid @reverse . +Comment: [uid] @reverse . +Upvote: [uid] @reverse . +Downvote: [uid] @reverse . +Tag: [uid] @reverse . ' comments.rdf.gz,posts.rdf.gz,tags.rdf.gz,users.rdf.gz,votes.rdf.gz diff --git a/dgraph/cmd/bulk/systest/suite02/schema.txt b/dgraph/cmd/bulk/systest/suite02/schema.txt index 760b996e8f3..6aa6a3b18b7 100644 --- a/dgraph/cmd/bulk/systest/suite02/schema.txt +++ b/dgraph/cmd/bulk/systest/suite02/schema.txt @@ -1,2 +1,2 @@ -friend: uid @count @reverse . +friend: [uid] @count @reverse . name: string @index(exact) . diff --git a/posting/index_test.go b/posting/index_test.go index f319a703fba..e4fb518601b 100644 --- a/posting/index_test.go +++ b/posting/index_test.go @@ -173,7 +173,7 @@ const mutatedSchemaVal = ` name:string @index(term) . name2:string . dob:dateTime @index(year) . -friend:uid @reverse . +friend:[uid] @reverse . ` // TODO(Txn): We can't read index key on disk if it was written in same txn. diff --git a/schema/parse_test.go b/schema/parse_test.go index 50a212a42cc..9f40cc85ed4 100644 --- a/schema/parse_test.go +++ b/schema/parse_test.go @@ -167,7 +167,7 @@ var schemaIndexVal5 = ` age : int @index(int) . name : string @index(exact) @count . address : string @index(term) . -friend : uid @reverse @count . +friend : [uid] @reverse @count . ` func TestSchemaIndexCustom(t *testing.T) { diff --git a/systest/bulk_live_cases_test.go b/systest/bulk_live_cases_test.go index d2de1b83509..0616c788edd 100644 --- a/systest/bulk_live_cases_test.go +++ b/systest/bulk_live_cases_test.go @@ -115,7 +115,7 @@ func TestFacets(t *testing.T) { func TestCountIndex(t *testing.T) { s := newSuite(t, ` name: string @index(exact) . - friend: uid @count @reverse . + friend: [uid] @count @reverse . `, ` _:alice _:bob . _:alice _:carol . diff --git a/systest/mutations_test.go b/systest/mutations_test.go index aa2f5ce7855..a8b31392af2 100644 --- a/systest/mutations_test.go +++ b/systest/mutations_test.go @@ -1634,7 +1634,7 @@ func HasReverseEdge(t *testing.T, c *dgo.Dgraph) { check(t, c.Alter(ctx, &api.Operation{ Schema: ` - follow: uid @reverse . + follow: [uid] @reverse . `, })) txn := c.NewTxn() diff --git a/wiki/content/mutations/index.md b/wiki/content/mutations/index.md index 60eb8ed461d..d5394b6a8b5 100644 --- a/wiki/content/mutations/index.md +++ b/wiki/content/mutations/index.md @@ -133,7 +133,7 @@ While Robin Wright might get UID `0x321` and triples An appropriate schema might be as follows. ``` xid: string @index(exact) . -: uid @reverse . +: [uid] @reverse . ``` Query Example: All people. diff --git a/wiki/content/query-language/index.md b/wiki/content/query-language/index.md index 7a99cd7afb9..123e95bb700 100644 --- a/wiki/content/query-language/index.md +++ b/wiki/content/query-language/index.md @@ -2020,7 +2020,7 @@ index for a predicate it is mandatory to specify the type of the index. For exam name: string @index(exact, fulltext) @count . multiname: string @lang . age: int @index(int) . -friend: uid @count . +friend: [uid] @count . dob: dateTime . location: geo @index(geo) . occupations: [string] @index(term) . @@ -2329,7 +2329,7 @@ First we add some schema. ```sh curl localhost:8080/alter -XPOST -d $' name: string @index(exact, term) . - rated: uid @reverse @count . + rated: [uid] @reverse @count . ' | python -m json.tool | less ```