PHP 'smart' search engine to search Mysql tables advice

Posted by Anonymous12345 on Stack Overflow See other posts from Stack Overflow or by Anonymous12345
Published on 2009-12-10T05:59:33Z Indexed on 2013/11/09 15:54 UTC
Read the original article Hit count: 222

Filed under:
|
|
|

I am creating a search engine for my php based website. I need to search a mysql table.

Thing is, the search engine must be pretty 'smart', so that users can easily find their items (it's a classifieds website).

I have currently set up a FULLTEXT search with this piece of code:

    MATCH (headline) AGAINST ($querystring)

But this isn't enough...

For instance, lets say the field headline contains something like Bmw 330ci. If I search for 330, I wont get any results. The ending ('ci') is just one of many endings in car models which must be taken into account when searching the table.

Or what if the headline field is bmw330? Also no results, because it only matches full words.

Or also, what if the headline is bmw 330, and I search for bmw 520, still with FULLTEXT I will get the bmw 330 as a result, even though I searched for bmw 520... Not good!

How should I solve this problem?

© Stack Overflow or respective owner

Related posts about php

Related posts about sql