ammezie
ammezie

Reputation: 355

Laravel Scout Where Clause Not Working As Expected

I am implementing full-text search with Laravel Scout and TNTSearch. Everything is working fine aside for the fact that my where clause is not effective in the search results.

return \App\Models\Ad::search('macbook')->where('school_id', 4)->get();

The code above is supposed to return search results for ads which school_id is 4, but it is not. Instead, it returns results for ads matching the search query irrespective of the where clause.

Is it that I am missing something or what?

Upvotes: 0

Views: 342

Answers (1)

ammezie
ammezie

Reputation: 355

I just realized that TNTSearch does not support filter yet.

Upvotes: 0

Related Questions