The admin/datastore?op=updateaspell administrative operation lets you rebuild the aspell dictionary for spelling correction from the data corpus while continuing to issue queries and updates to the Dgraph and without stopping and restarting it.
Run this command after you have added data records to the Dgraph, to enable spelling correction in the Dgraph.
During the data ingest process, you can run the admin/datastore?op=updateaspellcommand periodically to update the spelling dictionary used by the Dgraph for Automatic Spelling Correction and Did You Mean (DYM).
In a cluster of Dgraph nodes, this command should be run on the leader node only.
The constraint settings include minimum word occurrences and maximum and minimum number of characters, for records and attribute values. The Dgraph uses these constraints to update the spelling dictionary. You can change them in the Global Configuration Record.
Only one admin/datastore?op=updateaspell operation can be processed at a time.
admin/wine?op=updateaspell&outerTransactionId=42If a transaction is running and you don't specify the ID, or the ID is incorrect, the request is rejected.
... spellengine aspell ran successfully.
Time taken for updateaspell, including wait time on any previous updateaspell, was 290.378174 ms.