Click to See Complete Forum and Search --> : MySQL boolean text search help


ixxalnxxi
04-08-2008, 05:10 AM
using mysql 5.0.

i have the following entry in a table called 'doctors':

DoctorID, FirstName, LastName, ContactPhone

and their values, respectively

28, mo, khan, 133534634

when i run the query:

SELECT DoctorID, FirstName, LastName, d.ContactPhone,
MATCH (
FirstName, LastName
)
AGAINST (
'+"khan"'
IN BOOLEAN
MODE
)
FROM Doctors d, Users u
WHERE u.UserID = d.UserID
AND u.UserID =12
AND d.Active =1
AND MATCH (
FirstName, LastName
)
AGAINST (
'+"khan"'
IN BOOLEAN
MODE
)
LIMIT 0 , 30

i get the correct results. but when i swap the 'khan' with 'mo', i do not get the same results. any suggestions?

(fulltext is on for the FirstName and LastName columns)

chazzy
04-08-2008, 05:43 AM
maybe it would help if you gave us what you're getting in each case, and what you expect?

ixxalnxxi
04-08-2008, 05:54 AM
searching with either 'khan' or 'mo' should yield the same results ('khan' does this successfully, 'mo' does not)

searching 'mo' returns an empty set, and 'khan' selects all the values that i listed in the entry in the initial post

chazzy
04-08-2008, 06:25 AM
What's the value of ft_min_word_len on this system? if it's 3 (the default) then mo won't return anything.

ixxalnxxi
04-08-2008, 03:08 PM
i looked into ft_min_word_len and it is 4, and i made the edit to the my.ini but MySQL still has not picked up on it, i am supposed to restart my MySQL. would this delete everything on the mysql? how would i restart MySQL from a query or phpmyadmin?

chazzy
04-08-2008, 06:33 PM
restarting mysql doesn't lose all of your data. you need access to the server, and i think the program's called mysql stop. http://blog.taragana.com/index.php/archive/how-to-startstop-mysql-server-on-linux/