I am creating a small search function for my site. I take my custom query, basing the keywords, and then running a full MySQL search with the keywords I search.
The problem is that MySQL treats stems as literals. Here is the process that happens:
- the user is looking for the word "baseball"
- my algorithm (Porter Stemmer) turns baseball into basebal.
- fulltext does not find anything suitable "basebal", although there MUST be matches for "baseball" and "baseball".
How to make LIKE equivalent of 'basebal%' with full text?
EDIT:
Here is my current request:
SELECT MATCH (`title`,`body`) AGAINST ('basebal') AS `relevance`,`id` FROM `blogs` WHERE MATCH (`title`,`body`) AGAINST ('basebal') ORDER BY `relevance` DESC
source share