0

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?

Bilal Arshad
  • 531
  • 3
  • 11
  • 33

1 Answers1

0

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();