-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
attributesToRetrieve: array_flip(): Can only flip string and integer values, entry skipped #750
Comments
@pedzed you should add the
So what happens is, that we Will add an improvement to this |
Seemingly, Requiring |
the unique identifier on the search index needs to be set in the payload. Otherwise meilisearch and laravel scout could never connect a search result with the according dataset in the database. If you need to send a custom search query to meilisearch and just use the result of the meilisearch payload, you could probably get the meilisearch instance from the service provider and call the meilisearch SDK yourself. scout/src/ScoutServiceProvider.php Lines 26 to 34 in 9f64e8e
|
What I'd like to do is search in I'm now using $options['filter'] = 'field1="' . $query . '" OR field2="' . $query . '"'; However, I'm not sure if this is "safe", as one may tamper with the filter like with SQL injection. |
@pedzed Ahh..I mixed the I think what you are searching for is https://www.meilisearch.com/docs/reference/api/settings#searchable-attributes |
@mmachatschek thanks! Can we close this one? |
@driesvints I'll try to send a PR for the |
as info from my PR
|
Scout Version
10.2.2
Scout Driver
Meilisearch
Laravel Version
10.14.1
PHP Version
8.2.4
Database Driver & Version
No response
SDK Version
1.2.0
Meilisearch CLI Version
No response
Description
I'm getting the following error:
I'm probably doing something wrong, but either way, there is something wrong with the library. Perhaps missing precondition checks?
If the mistake is on my side, then I expect an exception to be thrown with a clear description of what's wrong.
Steps To Reproduce
In
MyModel
, have something like:In
scout/config.php
, have something like:Then update those indexes:
Finally try searching with:
Now expect the error:
Remove this line and the error goes away:
The text was updated successfully, but these errors were encountered: