2
I am using the following syntax in SQL for searches:
SELECT * FROM exemplo WHERE MATCH(title,content,tag) AGAINST(?)
Regarding the LIKE I had a better result, but it is not yet 100%.
for testing purposes, I have a title-only record with the other empty fields, so:
seeing car a little dented on the side year 2002
And I do the following search:
I buy car of the year 2002;
But the result is false, what can I do to make the search more efficient and relate as many words as possible of the title even if they are not side by side?
By default Mysql uses
IN NATURAL LANGUAGE MODE
, try using theIN BOOLEAN MODE
. So keepAGAINST(? IN BOOLEAN MODE)
. See https://dev.mysql.com/doc/refman/5.5/en/fulltext-search.html.– Inkeliz
Keep it up, buddy, but I’ll read it and look it up...
– Thiago
I found this article and helped a lot in the result I wanted http://www.hackingwithphp.com/9/3/18/advanced-text-searching-using-full-text-indexes
– Thiago