Skip to content
This repository has been archived by the owner on Feb 5, 2023. It is now read-only.

Where Clauses #74

Closed
ahmadarif opened this issue Aug 21, 2017 · 5 comments
Closed

Where Clauses #74

ahmadarif opened this issue Aug 21, 2017 · 5 comments

Comments

@ahmadarif
Copy link

I get an error when using this code
Post::search($keyword)->where('id', '>', 6)->get();

What's the code for needs like this?

@kronthto
Copy link
Contributor

The definition of the where method allows only 2 Parameters. That is an limitation of laravel/scout itself, not this Elastic driver. It is also mentioned in the docs: https://laravel.com/docs/master/scout#where-clauses

@ahmadarif
Copy link
Author

Oh i see, thanks for information.
So, I just can manipulate after ES process the search function?

@kronthto
Copy link
Contributor

In a project in my company we also need more complex searches, so we use a custom fork of this driver that has #56 merged. This way we can pass what we like to Elastic.

@ahmadarif
Copy link
Author

Very nice, I will try this solution.
Thank's very much @kronthto :D

@ErickTamayo
Copy link
Owner

#56 has been merged.

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

No branches or pull requests

3 participants