Jump to content

Search for things that are similar


The Little Guy

Recommended Posts

Is there any way to do a search for words that mean the same thing?

 

For example

canine, dog, k9

 

those three all mean the same thing (or very close to the same).

 

So, if someone did a search on my site such as:

 

How fast does light travel?

they could also do

How fast can light travel?

 

It would pull up almost the exact same thing.

 

I tried using soundex but that doesn't work, I am currently using REGEXP but that doesn't even do this. MATCH AGAINST might do it, but I believe that it will slow down when I start to get lots of data (but I could be wrong).

 

So what is the best way to do this?

Link to comment
https://forums.phpfreaks.com/topic/222181-search-for-things-that-are-similar/
Share on other sites

You would need to have massive lists and word associations for every word that could possibly be typed. Or some type of type associations you feel they may type.

 

Maybe can link to some thesaurus somewhere, I'm not sure. To me it seems like be too much usage and mess the phrases up entirely.

 

Now if just wanted to do something as suggestions......you would be able to insert the values such as you stated above and let them click which they prefer.

 

http://www.w3schools.com/php/php_ajax_php.asp

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.