-
Notifications
You must be signed in to change notification settings - Fork 35
Description
- Laravel Version: 10.39
- Nova Version: 4.32.11
- PHP Version: 8.3.1
- Database Driver & Version: Postgresql 12
- Operating System and Version: Mac Os M2 (Somona)
- Browser type and version: Arc
- Reproduction Repository: https://github.com/###/###
- Meilisearch : "meilisearch/meilisearch-php": "^1.5"
Description:
I'm having an issue with the results displayed on the global search when using scout with meilisearch. I have an index "orders" which contains a "public id" of format XXXXX-XXXXX-XXXXX.
When I type an order id, I don't get the results in the order it should be. The issue is not present when searching for the same order in the index views of the resource.
When digging in the SQL query made to be used, the IDs of the rows in the DB are in the correct order. It just get reordered incorrectly.
This looks like a bug that already existed with Algolia: laravel/scout#369.
When searching for the term direct on Meilisearch, it's ordered correctly
Basically, I believe that there's some sort of reordering for the global search that override the original sorting. While trying to dig in the source, I saw the order being "killed" here : vendor/laravel/scout/src/Engines/MeilisearchEngine.php:282 (map method).
Here you can see, the IDs are different than the one expected. I have nothing in my resource class that could override the ordering.
Hope this is clear enough, happy to help futher if needed





