I want to use whereNot
in laravel scout search but it is not working. although where
clause is working fine
Address::search("{$address->suburb}")->whereNot('id',$address->id)->get();
How i can do that?
I want to use whereNot
in laravel scout search but it is not working. although where
clause is working fine
Address::search("{$address->suburb}")->whereNot('id',$address->id)->get();
How i can do that?
You can directly do Full Text Search in AES. Read the Docs.
Laravel Scout comes with Algolia
and MeiliSearch
drivers but if you are writting your own driver for ElasticSearch
, this link will help you in every aspect including WhereNot
and all other clauses.
ES::type("my_type")->whereNot("status", "published")->get();
# or
ES::type("my_type")->whereNot("status", "=", "published")->get();