Jump to content

Recommended Posts

Is it possible to train your search query to find similar words to what the user submitted?

 

Example, the word "Lobster" is in the database, using Full text search with IN BOOLEAN MODE, if the user submits "Lobst" and the wild card variable "*" is added after the word, it will find "Lobster", but is there a way to still get the proper results if the user were to enter the word "Lobsters" - or plural?

 

Would it be best to automatically remove the last two letters of all words submitted that are over five characters long and just add the wild card?

 

Just curious if there is an easier way to do this and I'm just over analyzing.

 

Cheers,

Andrew

Link to comment
https://forums.phpfreaks.com/topic/205242-full-text-with-in-boolean-mode-question/
Share on other sites

Hi there.

 

Make a iterates over each letter "l, lo, lob, lobs..." that keeps a previous_iteration_results and a obtains a current_iteration results. As soon as there are no matches in current_iteration_results, you return previous_iteration_results.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.