Skip to content
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

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

Merged
merged 2 commits into from
Nov 13, 2024
Merged

Conversation

dwightwatson
Copy link
Contributor

@dwightwatson dwightwatson commented Nov 13, 2024

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:

  • It attempted to access config keys directly when previously the config helper was used,
  • It attempted to give the an array of configuration to the v3 search config object, when previously the id/secret were provided as separate arguments,
  • It confused local variables $config (the Laravel configuration array) and $configuration (the Algolia search config object)

@crynobone crynobone marked this pull request as draft November 13, 2024 09:06
@crynobone crynobone changed the title Fix Algolia 3/4 engines [10.x] Fix Algolia 3/4 engines Nov 13, 2024
@crynobone crynobone marked this pull request as ready for review November 13, 2024 09:38
@crynobone crynobone merged commit cfce53b into laravel:10.x Nov 13, 2024
17 checks passed
@brocard
Copy link

brocard commented Nov 13, 2024

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants