File tree Expand file tree Collapse file tree 3 files changed +96
-73
lines changed Expand file tree Collapse file tree 3 files changed +96
-73
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,17 @@ op = pydgraph.Operation(schema=schema)
9090client.alter(op)
9191```
9292
93+ Starting Dgraph version 20.03.0, indexes can be computed in the background.
94+ You can set ` run_in_background ` field of the ` pydgraph.Operation ` to ` True `
95+ before passing it to the ` Alter ` function. You can find more details
96+ [ here] ( https://docs.dgraph.io/master/query-language/#indexes-in-background ) .
97+
98+ ``` python
99+ schema = ' name: string @index(exact) .'
100+ op = pydgraph.Operation(schema = schema, run_in_background = True )
101+ client.alter(op)
102+ ```
103+
93104` Operation ` contains other fields as well, including drop predicate and drop all.
94105Drop all is useful if you wish to discard all the data, and start from a clean
95106slate, without bringing the instance down.
Original file line number Diff line number Diff line change @@ -101,6 +101,9 @@ message Operation {
101101 // If drop_op is ATTR or TYPE, drop_value holds the name of the predicate or
102102 // type to delete.
103103 string drop_value = 5 ;
104+
105+ // run indexes in background.
106+ bool run_in_background = 6 ;
104107}
105108
106109// Worker services.
You can’t perform that action at this time.
0 commit comments