Table structure:
Companies: id, name, city, branch, keywords, country
The keywords field contains the name city and branch together, I now just use a LIKE with wildcards for example '%music london%' will return 'musicfactory london'
But it is not precise enough for example if the user wants to search Vini & Magraine in London (a restaurant) and the input was 'vini londen' it was not found, however if the user inserts 'magraine london' it will get found.
So the problem is prob the order the keywords are, now I'm planning to converting to a fulltext search, I've created the index on the keywords field, also is the keywords field a smart idea?
My primary question is, I created a fulltext search with this query:
SELECT id, name, branch FROM companies WHERE MATCH(keywords) AGAINST(? IN BOOLEAN MODE) AND country = ? LIMIT 7
However it ain't returning the correct results? What is the best and most of all working solution?
Thanks for reading.