laravel / scout

Laravel Scout provides a driver based solution to searching your Eloquent models.
https://laravel.com/docs/scout
MIT License
1.57k stars 336 forks source link

[10.x] Fix Algolia 3/4 engines #884

Closed dwightwatson closed 1 week ago

dwightwatson commented 1 week ago

After upgrading from Scout 10.11.4 to 10.11.6 I started having issues with Algolia.

Cannot use object of type Algolia\AlgoliaSearch\Config\SearchConfig as array

I believe the issue is due to bugs introduced in #872 which added support for Algolia v4, but also broke support for Algolia v3. #881 has also been opened as other people have run into the same issue.

When I first saw the error I thought it was because I still had Algolia v3, so I bumped straight to v4 and then got another error.

Undefined array key "batch_size"

I've tested these fixes locally using both Algolia v3 and v4 and my search results are working again where previously they were not.

It appears the PR made mistakes:

brocard commented 1 week ago

Thanks