MeiliSearchEngine\map | lazyMap functions issue, hidden modelKey
OctaYann opened this issue · 3 comments
Scout Version
9.8.1
Scout Driver
Meilisearch
Laravel Version
8.12
PHP Version
8.0.21
Database Driver & Version
MariaDB 10.8.3
SDK Version
Meilisearch v1.3.4
Meilisearch CLI Version
Docker version
Description
When you hide the modelKey from the "displayedAttributes" array in meilisearch scout conf, you go this error : array_flip(): Can only flip string and integer values, entry skipped
.
After reading the code, it's totally normal but should throw a better Exception message to force user to expose his model key or custom it.
I opened an issue 'cause idk if it's a normal behavior.
Btw, Laravel 8 documentation is not up to date about Laravel Scout, correct configuration can be found in Laravel 10 version of the doc but there is no big difference between Scout v9 and v10 conf, so it's weird ...
Thank you for the work, love the api !
Steps To Reproduce
- Create a laravel app in version 8 (php 8, Meilisearch Docker last version, Scout 9.8.1)
- Follow step to configure scout with Meilisearch
- hide model key in the "displayedAttributes" array in meilisearch scout configuration
- Try to search data from this model
- get
array_flip(): Can only flip string and integer values, entry skipped
'cause modelKey does not exists in data
You need to update laravel/scout
to the 10.x branch in order to use meilisearch >v1.0
Hey there,
Unfortunately we don't support this version anymore. Please check out our support policy on which versions we are currently supporting. Can you please try to upgrade to the latest version and see if your problem persists? If so, please open up a new issue and we'll help you out.
Thanks!
Oooh, my baaad, i forget about the end of support date.
Thanks!