You're probably looking for a full-text index. See the online documentation:
http://dev.mysql.com/doc/mysql/en/fulltext-search.html
There are many, many gotchas to full-text searching (stop words, a 50% threshold, et cetera) that can cause unexpected results, so be sure to read every single word.
____________________________________________________________ Eamon Daly
----- Original Message ----- From: "Erik Bukakis" <[EMAIL PROTECTED]>
To: "MySQL Discussion List" <mysql@lists.mysql.com>
Sent: Monday, May 09, 2005 2:10 PM
Subject: Sorting by relevance?
I just learned a lot stuff at http://dev.mysql.com/doc/mysql/en/sorting-rows.html including sorting by number-to-text, text-to-number, names, specific values, etc.
However, the document didn't mention on how to sort by relevance.
For instance, someone search for "Ang": COLUMN NAME: name COLUMN TYPE: varchar (255) DATA: John Ang La Chi Zoygote Anglosaxon Marco Polo Ang Fernandez John Pang Cuyi
Query result should be: Ang Fernandez John Ang Anglosaxon John Pang Cuyi
Is it possible to sort a column this way?
^_^ Thanks in advance. ^_^
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]