473,668 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Similar Search Results - FULLTEXT or Algorithm

SC
Ok, first of all I'm sure that what I want to do isn't going to be easy...

I'd like to be able to take user input and query the database to return
exact and similar results. I have added a FULLTEXT index of the column I
want to search to the table. Then taking user input and break it apart into
separate words and use something like:

MATCH (table) AGAINST ('*word1*' '*word2*' IN BOOLEAN MODE) AS Score

in my SELECT and then ORDER BY Score DESC and that works pretty good, but
I'd like to factor in misspellings, abbreviations, etc. I have searched to
see if I could find code for an existing algorithm that I could try, but all
I have found are articles talking about different algorithms and no actual
code.

Any help, suggestions, ideas, links to code, etc would be greatly
appreciated.

Thanks
Jul 17 '05 #1
1 1837
Hi

I am having the same sort of problem, and surprisingly nobody has been
able to give me any help. However i've used the levenshtein() or
soundex() to give a reasonable accurate search of words exactly like and
'sound like' a word entered into a search field. Depending on the size of
your database to be searched, this may be a viable option. As it does need
every word entered into the search field to be matched against every word
in every field in the database that you want to search to get an accurate
result, it would be slow on larger sized databases.

I dont know if this helps but its the best i come across for the same
problem

Cheers

Will

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
5765
by: Phil Powell | last post by:
The table already has a fulltext index and from there I can use the MySQL fulltext search query to get results as well as the relevancy score. The problem I have is that MySQL has a default setting whereby the minimum amount of characters is 4 for a search. Being that we're government and full of TLA (three-letter acronyms), that is not practical, and furthermore, the app I'm building must be fully portable, so having MySQL tweaked...
1
2354
by: willl69 | last post by:
Hi Guys, I have been writing a database search for my site, to increase the accuracy and chance of a successful resut i have used the metaphone() and similar_text() comparisons to find the database entries that contain the most words closely resembling the entered search criteria (only words with a 80%+ similarity are recorded). The value for each word over 80% is stored in an array, then the average worked out from that array to gauge...
5
2047
by: AaronV | last post by:
Hello, I'm a webmaster for a college newspaper and I'm implementing an article search. I'm running PHP with a MySQL database to store the weekly stories. Does anyone know of an article that could offer good search theory. My top priority right now is multiple search terms and relevance sorting based on how many word hits are returned.
4
1598
by: middletree | last post by:
Intranet tech support system using ASP/VBScript running on W2000 Server, IIS, and using SQL Server 2000. I need to add a search engine. The problem with using a regular SQL query is that if you put a phrase, say "red car" in the text box, to hit submit, my SQL qurey would only look for that phrase, and would leave out other items where the words red and car appeared separately. I guess what I am saying is that I would like something like...
2
1210
by: Marc | last post by:
Apologies if this is not the correct place to put this. I wrote this query to perform a fulltext search on tblPages. SELECT * FROM tblPages, FREETEXTTABLE(tblPages, *,@searchTerm) searchTable WHERE = tblPages.PageID ORDER BY RANK DESC Where PageID is the primary key.
0
1420
by: Robert Oschler | last post by:
I read a while back that MySQL will only use one index per query. (If this is not so, please tell me and point me to a doc that gives a good explanation of MySQL's current index usage policy). I'm using MySQL 4.2.x. Here's my dilemma. 1) --------- I have two tables that have records with a FULLTEXT index text field in each of them. The problem is the relationship between the tables is a
6
3326
by: DC | last post by:
Hi, I am programming a search catalogue with 200000 items (and growing). I am currently using the SQL Server 2000 fulltext engine for this task but it does not fit the requirements anymore. The products typically do have a verbose name, "canadian superapples: red tasty juicy macintosh apple from toronto" and the like. If a customer is looking for "canadian apple" this product needs to match, but also if he is looking for "juicy mac".
3
1449
by: Michael | last post by:
Hi, I have not implimented a search feature yet for a web site yet and wanted to get some advice. Most of the search tips I have seen so far only deal with searching html files or other web files. I don't need this type of search. All I need to do is search the products tables (description and Name fields) and return the results. Now, I could do a query like: Select * from products where description like @SearchWord But I'm not sure if...
3
1396
nathj
by: nathj | last post by:
Hi, I am just trying to develop a search system for my website. The PHP side of things is no trouble at all. I have also set up what I think are appropriate FULLTEXT indices on the tables I will need to search. I was just trying things out and have got a bit confused. What I think should be happening, based on what I've read, is not happening. I have a table - tbl_resource, on this table there is FULLTEXT index on three fields -...
0
8459
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8890
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8791
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8575
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8653
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7398
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2018
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.