laravel full-text search with multiple keywords together

1.3k views Asked by At

i am building a laravel project search field where i use a full-text search. I have managed to get this to work, but i cannot get multiple keywords to search together.
example: i have a row with a value of one two three four if i search two three it finds all entries with either two or three in them. But i want it to find the entry with both two and three

SQL query:

DB::raw("select id, name, text, image, publishDate from game
where match (name) AGAINST ('*$searchphrase*' IN BOOLEAN MODE) LIMIT 5")
1

There are 1 answers

3
Bishal Paudel On

Please see this: http://goo.gl/lZIKBk at https://dev.mysql.com/doc/refman/5.5/en/fulltext-boolean.html

"+" stands for AND

"-" stands for NOT

[no operator] implies OR

You don't have any operator which implied "OR".