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

[6.0] Skip empty updates #318

Merged
merged 3 commits into from
Nov 10, 2018
Merged

[6.0] Skip empty updates #318

merged 3 commits into from
Nov 10, 2018

Conversation

mnightingale
Copy link
Contributor

If a models toSearchableArray() returns an empty array the current behaviour in the AlgoliaEngine basically ends up calling the equivalent to collect([null])->filter()->values()->all()which returns [] therefore we call $index->addObjects([]) and a wasteful API request is made to Algolia, since the code filters out empty data I think the intended behaviour was not to call an indexing operation.

@driesvints driesvints changed the title Skip empty updates [6.0] Skip empty updates Nov 10, 2018
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.

2 participants