List:General Discussion« Previous MessageNext Message »
From:Thomas Spahni Date:January 5 2004 4:50pm
Subject:Re: FULLTEXT Search and Hyphens
View as plain text  
Michael,

have a look at the sources, especially myisam/ft_parser.c near line 108
and at myisam/ftdefs.h. It should not be difficult to hack the sources to
make the hyphen a real character. This will solve your problem (but could
create some new ones on others types of text input).

Thomas


On Wed, 31 Dec 2003, michael elston wrote:

> I am having some trouble with fulltext search when searching a Table
> for parts numbers which contain HYPHENS ( - ) and i am 90% sure that is
> where the problem is.
>
> My query is:
> SELECT * FROM ms_items
> where MATCH (it_mnfgID, it_title, it_descrip) AGAINST ('*kk-4835*' IN
> BOOLEAN MODE )
>
> What i want to be able to accomplish is say your are searching for a
> "KK-4835"
>
> I want to be able to type in "KK-4835", "KK4835", or even "KK 4835) and
> all return the same part. as it stands right now,  searching for even
> just "kk-" returns nothing  but searching for "4835" will return items
> with 4835.
>
> is this a known problem with MySQL or is there a way around it? I am
> half tempted to create another column for keywords.
>
> thanks for any help
>
> -me

Thread
FULLTEXT Search and Hyphensmichael elston31 Dec
  • Re: FULLTEXT Search and HyphensDan Nelson31 Dec
  • Re: FULLTEXT Search and Hyphenstk31 Dec
    • Re: FULLTEXT Search and Hyphenstk31 Dec
  • Re: FULLTEXT Search and HyphensThomas Spahni5 Jan