Page 1 of 1

full text search input rules

Posted: Mon Jan 31, 2005 1:37 am
by C_Calav
ok i have been reading the mysql manual. now how can i set my seach to a minium of 2 characters instead of 3?

plus, am i able to search just part of a word?

put "pen" in and get the result back oin my search of "pencil"

thanx guys. ps may want to move thread as i have edited it :?

Posted: Mon Jan 31, 2005 7:16 am
by feyd
as far as I know, you cannot change the default search to lower than 3 characters. This is most likely because of the shear number of instances where those letters would occur, and thus would be removed from the results.

at the least, you can use the LIKE wildcards to find pencil when searching against pen. Since I haven't really fiddled with full-text searches, query expansion may do sort of the same thing..

Posted: Mon Jan 31, 2005 3:42 pm
by C_Calav
thanx feyd, how would i incorperate "LIKE" into my querry?

is it possible top have match and like in the same queery?

Code: Select all

$query = "SELECT * FROM planes WHERE MATCH (P_Desc) AGAINST ('$keyword') ";
thanx

Posted: Mon Jan 31, 2005 3:47 pm
by John Cartwright

Code: Select all

$query = "SELECT * FROM planes WHERE `P_Desc` LIKE '%$keyword%'";
My stab at it :P

Posted: Mon Jan 31, 2005 6:59 pm
by C_Calav
thanx Phenom and feyd will try it out when i get home!

Posted: Thu Feb 03, 2005 7:24 pm
by C_Calav
this does not seem to bring any results back from the database!

Code: Select all

$query = "SELECT * FROM planes WHERE `P_Desc` LIKE '%$keyword%'";
does anyone else have any clue on how to do full text search on part of a word?