elastic / elasticsearch-php

Official PHP client for Elasticsearch.
https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/index.html
MIT License
5.25k stars 963 forks source link

Why Can't I update the mapping with Laravel Scout? #1401

Closed tronlinky closed 1 month ago

tronlinky commented 1 month ago

Summary of problem or feature request

I have changed the model mapping in config/elasticsearch.php in my Laravel Project, and clear the config cache. Then, I deleted my index and import the model again with the command as bellow

curl -XDELETE "http://localhost:9200/model_xxxxxxxxxxxxx?pretty" php artisan scout:import 'App\Model'

but I found that the mapping didn't change. I didn't know why, is there some kind of cache in elasticsearch or scout ?

if there someone know why is it happened ?

ezimuel commented 1 month ago

In the elasticsearch-php client there's no cache. It seems a problem related with Scout or Laravel. I suggest to open an issue in https://github.com/laravel/scout.