1. When running sudowww ‘php artisan es:migrate’, an error occurred: Custom Analyzer [ik_smart_synonym] failed to find tokenizer under name [ik_smart]. See Figure 1.
![When running sudowww 'php artisan es:migrate', an error occurred: Custom Analyzer [ik_smart_synonym] failed to find tokenizer under name [ik_smart]](https://media.shuijingwanwq.com/2022/09/1-13.png)
Plaintext
root@iZ2ze4fjghbbj74d4kfnf0Z:/var/www/laravel-shop# sudowww 'php artisan es:migrate'
Processing index products
Index does not exist, preparing to create
Elasticsearch\Common\Exceptions\BadRequest400Exception
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Custom Analyzer [ik_smart_synonym] failed to find tokenizer under name [ik_smart]"}],"type":"illegal_argument_exception","reason":"Custom Analyzer [ik_smart_synonym] failed to find tokenizer under name [ik_smart]"},"status":400}
at vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:693
689▕ $exception = new ScriptLangNotSupportedException($responseBody. $statusCode);
690▕ } elseif ($statusCode === 408) {
691▕ $exception = new RequestTimeout408Exception($responseBody, $statusCode);
692▕ } else {
➜ 693▕ $exception = new BadRequest400Exception($responseBody, $statusCode);
694▕ }
695▕
696▕ $this->logRequestFail($request, $response, $exception);
697▕
+9 vendor frames
10 app/Console/Commands/Elasticsearch/Migrate.php:64
Elasticsearch\Namespaces\IndicesNamespace::create()
11 app/Console/Commands/Elasticsearch/Migrate.php:30
App\Console\Commands\Elasticsearch\Migrate::createIndex()
root@iZ2ze4fjghbbj74d4kfnf0Z:/var/www/laravel-shop#
2. Reference: After installing Elasticsearch by running the command ./20.04/install_elasticsearch.sh 7, the corresponding version of the IK tokenizer plugin was not installed. The operation succeeded. See Figure 2.

Plaintext
root@iZ2zeh119jtszpxb8sf8pvZ:/var/www/laravel-shop# sudowww 'php artisan es:migrate'
Processing index products
Index does not exist, preparing to create
Created successfully, preparing to initialize data
Operation succeeded
