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] Add filter support with comparison operators for the case of Meilisearch Engine #778

Closed

Conversation

rrakibul
Copy link

@rrakibul rrakibul commented Nov 2, 2023

Add filter support with comparison operators for the case of Meilisearch Engine.

Meilisearch (v1.4) currently supports filtering features with comparison operators (>, <, >=, <=, TO). Laravel scout only supports = operation with where clause.

However, in this PR

  • I have extended the where clause capability by adding an extra optional parameter in the second position to mention the comparison operator. I've handled the case when user will only provide two parameters. This will keep the existing functionality as it is.
  • I've also added new whereBetween builder property and functions to facilitate where between comparison.
  • Lastly I have modified the filter function for the meilisearch engine to support the comparison operations in the Engines/MeilisearchEngine.php file.

@driesvints driesvints changed the title Add filter support with comparison operators for the case of Meilisearch Engine [10.x] Add filter support with comparison operators for the case of Meilisearch Engine Nov 2, 2023
@mmachatschek
Copy link
Contributor

Although I like more configurability I have to say that these changes were already tried multiple times:

#747
#715

Furthermore it doesn't make sense to update the Builder class without supporting the other engines (Algolia, etc.)

@driesvints
Copy link
Member

I'm sorry @rrakibul but it seems we won't be able to do this right now.

@driesvints driesvints closed this Nov 2, 2023
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