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

Handle empty whereIn clause #729

Merged
merged 2 commits into from
Apr 14, 2023
Merged

Conversation

jshah4517
Copy link
Contributor

@jshah4517 jshah4517 commented Apr 13, 2023

The Algolia and Meilisearch engines currently do not handle empty whereIn clauses correctly. Algolia seems to ignore it whereas Meilisearch gives an error. This pull request aims to resolve this.

Algolia

I've copied the fix that was included in algolia/scout-extended where they just send 0=1.
https://github.com/algolia/scout-extended/pull/265/files

Meilisearch

I've used the IN operator that was introduced in Meilisearch v0.29:
meilisearch/product#407 (comment)

This automatically handles the empty case and is a more elegant way of doing it instead of the OR operator.

@taylorotwell taylorotwell merged commit 3ca130d into laravel:10.x Apr 14, 2023
@jshah4517 jshah4517 deleted the empty-where-in branch April 14, 2023 16:21
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