On 31/03/2010 16:52, Tompkins Neil wrote:
HiI have the following fulltext search which appears to work fine for string phrases. However if I search like just "51" which is part of the string name like 51 Blue Widget in the table it doesn't return any results. However if I search like "bl" it returns the 51 Blue Widget result. My query is as follows : SELECT Name MATCH (Name) AGAINST ('51*') as Relevance FROM Products WHERE MATCH (Name) AGAINST ('51*' IN BOOLEAN MODE) ORDER BY Relevance DESC Any ideas what the problem might be ?
"51" is too short to be included in the index by default, so will never match. "Blue", on the other hand, is indexed and therefore is returned by a search.
The default minimum word length is four characters. See http://dev.mysql.com/doc/refman/5.0/en/fulltext-fine-tuning.html for more information on how to change that if necessary.
Mark -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[email protected]
