Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preparing changes of uid syntax* association. And fixed a writing error in the docs. #3002

Merged
merged 4 commits into from
Mar 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contrib/integration/testtxn/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
34 changes: 17 additions & 17 deletions dgraph/cmd/bulk/speed_tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,27 @@ 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 "========================="
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

Expand All @@ -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
2 changes: 1 addition & 1 deletion dgraph/cmd/bulk/systest/suite02/schema.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
friend: uid @count @reverse .
friend: [uid] @count @reverse .
name: string @index(exact) .
2 changes: 1 addition & 1 deletion posting/index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion schema/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion systest/bulk_live_cases_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 <friend> _:bob .
_:alice <friend> _:carol .
Expand Down
2 changes: 1 addition & 1 deletion systest/mutations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1632,7 +1632,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()
Expand Down
2 changes: 1 addition & 1 deletion wiki/content/clients/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ for each transaction.
2. The set of keys modified by the transaction (`keys`). This aids in
transaction conflict detection.

Every mutation would send back a neeuatw set of keys. The client must merge them
Every mutation would send back a new set of keys. The client must merge them
with the existing set. Optionally, a client can de-dup these keys while
merging.

Expand Down
2 changes: 1 addition & 1 deletion wiki/content/mutations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ While Robin Wright might get UID `0x321` and triples
An appropriate schema might be as follows.
```
xid: string @index(exact) .
<http://schema.org/type>: uid @reverse .
<http://schema.org/type>: [uid] @reverse .
```

Query Example: All people.
Expand Down
4 changes: 2 additions & 2 deletions wiki/content/query-language/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1985,7 +1985,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) .
Expand Down Expand Up @@ -2294,7 +2294,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

```
Expand Down