List:General Discussion« Previous MessageNext Message »
From:Lars Schwarz Date:February 13 2007 2:54pm
Subject:Re: [Fwd: search issue]
View as plain text  
hi afan,

depending on your mysql conf you have a minimum word length. check
your config for:

ft_min_word_len

and change it to 3.

hth: lars

On 2/13/07, afan@stripped <afan@stripped> wrote:
> hi to all!
>
> I'm trying to get some products from products table using fulltext search
> but something doesn't work correctly - and can't find what.
>
> this is table products:
> CREATE TABLE `products` (
>   `prod_id` int(8) unsigned NOT NULL auto_increment,
>   `prod_no` varchar(50) NOT NULL default '',
>   `prod_name` varchar(255) NOT NULL default '',
>   `prod_description` text,
>   `prod_colors` text,
>   `prod_includes` text,
>   `prod_catalog` varchar(45) default NULL,
>   `prod_status` enum('hidden','live','new') NOT NULL default 'new',
>   `prod_supplier` varchar(45) default NULL,
>   `prod_start_date` date default '0000-00-00',
>   `prod_end_date` date default '0000-00-00',
>   `prod_featured` enum('0','1') default NULL,
>   `on_sale` enum('Yes','No') NOT NULL default 'No',
>   PRIMARY KEY  (`prod_id`),
>   UNIQUE KEY `prod_no` (`prod_no`),
>   KEY `products_index1` (`prod_status`),
>   KEY `products_index2` (`prod_start_date`,`prod_end_date`),
>   KEY `on_sale` (`on_sale`),
>   FULLTEXT KEY `prod_search` (`prod_name`,`prod_description`)
> ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=9119 ;
>
>
> table products has 5168 records.
>
> when search for products that hav 'cap' in product name, using smple LIKE
> function:
> select prod_id, prod_no, prod_name, prod_status
> from products
> where prod_name like '%cap%'
> I get 79 rows.
>
> when try:
> select prod_id, prod_name, prod_no
> from products
> where MATCH (prod_name) AGAINST ('+cap' in boolean mode)
> I don't get any record as result.
>
> What I'm doing wrong?
>
>
> Thanks for any help.
>
> -afan
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>
Thread
[Fwd: search issue]afan13 Feb
  • Re: [Fwd: search issue]Lars Schwarz13 Feb
  • RE: [Fwd: search issue]Jerry Schwartz13 Feb
    • RE: [Fwd: search issue]afan13 Feb