1. Execute sudowWWphp artisan es:migrate, error: CUSTOM Analyzer[ik_smart_synonym]Failed to find tokenizer under name[ik_smart]. as shown in Figure 1
![执行 sudowww 'php artisan es:migrate' 时,报错:Custom Analyzer [ik_smart_synonym] failed to find tokenizer under name [ik_smart]](https://www.shuijingwanwq.com/wp-content/uploads/2022/09/1-13.png)
root@iZ2ze4fjghbbj74d4kfnf0Z:/var/www/laravel-shop# sudowww 'php artisan es:migrate'
正在处理索引 products
索引不存在,准备创建
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: Execute the command: ./20.04/install_elasticsearch.sh 7 After installing Elasticsearch, the corresponding version of the IK word segmentation plugin is not installed. The operation was successful. as shown in Figure 2

root@iZ2zeh119jtszpxb8sf8pvZ:/var/www/laravel-shop# sudowww 'php artisan es:migrate'
正在处理索引 products
索引不存在,准备创建
创建成功,准备初始化数据
操作成功
PHP / Laravel / Yii2 Legacy Project Maintenance & Long-Term Technical Support
If your PHP / Laravel / Yii2 project is already in production but needs bug fixing, API troubleshooting, performance optimization, developer handover support, or long-term maintenance, feel free to contact me for remote technical support.
Ideal For:
✅ PHP legacy systems without active maintenance
✅ Laravel / Yii2 project bug fixes
✅ Admin panel feature iterations
✅ RESTful API troubleshooting
✅ MySQL / Redis / Nginx performance issues
✅ Long-term remote part-time maintenance
We can start with a small task:
✅ Production error troubleshooting
✅ API issue analysis
✅ Slow query and performance bottleneck diagnosis
✅ Initial code structure review
✅ Deployment environment and log inspection
If you would like to discuss your project, please contact me and mention: PHP Maintenance Consultation.
Contact Me:
Telegram: @shuijingwan
WeChat: 13980074657
Email: shuijingwanwq@gmail.com

Leave a Reply