Closed tillkruss closed 6 years ago
I also think that a few more complex query options should be added. Perfectly those should match the eloquent query builder methods.
As an extra reason I can add, that different providers are adding similar filters:
yab/laravel-scout-mysql-driver
is using ->where('rating >', 5)
damiantw/laravel-scout-mysql-driver
is using ->where('rating >', 5)
babenkoivan/scout-elasticsearch-driver
is using ->where('rating', '>', 5)
This inconsistency makes it hard to switch between drivers, when using any form of range filtering of search results, and those are very common, eg. in online shops where users can pick price range.
This was declined in https://github.com/laravel/scout/pull/141/files so going to close this. You can always try http://github.com/laravel/ideas to see if there's more people who want this :)
Right now Scout only supports simple chained where clauses. I regularly need to perform queries like
!=
and the simplest solution for that seems to be this:Which doesn't read very nicely. Could we add advanced queries to Scout?
I'm happy to submit a PR.