algolia / scout-extended

Scout Extended: The Full Power of Algolia in Laravel
https://www.algolia.com/doc/framework-integration/laravel/getting-started/introduction-to-scout-extended/
MIT License
395 stars 85 forks source link

Add scope for search #270

Closed kossa closed 3 years ago

kossa commented 3 years ago

Description

I want to add some filters, like price between ..., there is a way to add scope ? so dont need to duplicate the same code ?

DevinCodes commented 3 years ago

Hi @kossa ,

Unfortunately, this is not possible for us to do. Since records in Algolia are not relational, there's only support for simple where clause, which you have to define manually. Scout Extended adds some extra where* methods (such as whereBetween), but unfortunately we're not able to apply scopes.

kossa commented 3 years ago

Thank you @DevinCodes