How to make Laravel and Elasticsearch become friends
Ivan Babenko
47224

Hi Ivan Babenko,

Thanks so much for this tutorial!

However, I have two questions. How do you handle a situation where the data has changed on a model? Is it a case where once the data is saved it will go out and update the index or will we have to re-index using the command line every time?

Also, I made the change regarding the ‘match_all’ in the ElasticEngine.php file as directed on the repo, but I’m still running into issues with the ‘year’ column. It is as follows:

Elasticsearch\Common\Exceptions\BadRequest400Exception with message ‘{“error”:{“root_cause”:[{“type”:”mapper_parsing_exception”,”reason”:”Mapping definition for [year] has unsupported parameters: [analyzer : not_analyzed]”}],”type”:”mapper_parsing_exception”,”reason”:”Mapping definition for [year] has unsupported parameters: [analyzer : not_analyzed]”},”status”:400}’

I have followed every step in the tutorial and went over them twice, but still no resolution. If anyone has came across this or knows how to solve it, I’d appreciate any assistance.

I’m using: Laravel 5.4.23, Elasticsearch 5.4.0 and PHP 7.1.5

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.