Search algorithm issues in php / mysql

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
eroticheretic
Forum Newbie
Posts: 1
Joined: Wed Oct 04, 2006 6:55 am

Search algorithm issues in php / mysql

Post by eroticheretic »

Hello all,

I've been struggling a lot to write a good relevant search algorithm in php&mysql. our search basically deals with keywords.

I'm using a full search technique using match against in mysql query.

but thats giving some strage results.

say i'm searching for "free online degree"

its giving results for "free online degree","free online phones","free online games".......so on for all the keywords starting with "free online"

Also I want to distinguish b/w singular and plural....ie if anyone searches for "house" ...the search should also include for "houses"...and vice versa

I've checked the soundex function..but its not working our for me.

If i say "select * from <tab name> where soundex(keyword)=soundex('phones')" its returning
"pen inks","piano music","pop music".....which are no where related to my keyword "phones"

all these keywords have the same soundex value.

please help me out.

Thanks,
Sagar
Post Reply