ftcreate('index_spellcheck', $schema); // 2. Add dictionary with terms $client->ftdictadd('dict', 'hello', 'help'); // 3. Perform spelling correction query $response = $client->ftspellcheck( 'index_spellcheck', 'held', (new SpellcheckArguments())->distance(2)->terms('dict') ); echo 'Response:' . "\n"; print_r($response);