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

[meilisearch] support boolean filters #524

Merged
merged 2 commits into from
Sep 20, 2021
Merged

Conversation

G3z
Copy link
Contributor

@G3z G3z commented Sep 18, 2021

No description provided.

@G3z
Copy link
Contributor Author

G3z commented Sep 18, 2021

if a value is indexed as boolean it's now possible to use ->where('active', true):
this produces a meili query as follows '{"filter": ["active = true"]}' instead of '{"filter": ["active = '1'"]}'which does not work

please note that also '{"filter": ["active = 1"]}' does not work

limitations: ->where('active', 1) would still not work (maybe we should take a look at $casts parameter)

@mgralikowski
Copy link
Contributor

Hah, I faced the same problem today.

It is so strange for me to write sth like:

$query->where('is_active', 'true');

because only this works, even is_active is a boolean value.

@taylorotwell taylorotwell merged commit b2d0570 into laravel:9.x Sep 20, 2021
@G3z G3z deleted the patch-1 branch September 20, 2021 14:33
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