List:General Discussion« Previous MessageNext Message »
From:Michael Stassen Date:July 25 2004 12:17am
Subject:Re: Fulltext boolean search results
View as plain text  
 From the manual <http://dev.mysql.com/doc/mysql/en/Fulltext_Search.html>:

> MySQL uses a very simple parser to split text into words. A word is any
> sequence of characters consisting of letters, digits, ', or _. Some
> words are ignored in full-text searches:
>
>  Any word that is too short is ignored...

. and - are non-word characters, so they are treated as word separators. 
Hence, your query is asking for documents containing 'BT', '1034', and '06'. 
  The first and last are too short, so they are dropped, resulting in a 
search for just '1034'.  Documents are indexed similarly, so each of the 
examples you give are indexed as '1034' only; the parts before and after are 
too short and not indexed.  So you get the results you indicate.

When you add the quotes, results which match '1034' are then filtered for 
matches containing the exact text in quotes, "BT-1034.06" in this case, 
yielding the result you want.

Michael

leegold wrote:

> If I search on:
> BT-1034.06
> I get returned:
> BT-1034.02
> BT-1034.03
> BT-1034.05
> ...
> BT-1034.11
> 
> If I put in "" ie. "BT-1034.06"
> I only get BT-1034.06 returned.
> The BT- part seems irrelevant.
> 
> But I don't understand the results.
> Why so many returned? Seems like 1034.06
> w/out the "" is unique enough. Is '.' a special
> character and the cause? If no simple answer
> I'll show you my code if necessary. Thanks for the help.
> 4.1.3a-beta for win32
> Lee G.
> 

Thread
Errcode: 27J S23 Jul
Re: Errcode: 27Aman Raheja23 Jul
Re: Errcode: 27J S24 Jul
RE: Errcode: 27J S24 Jul
  • Fulltext boolean search resultsleegold25 Jul
    • Re: Fulltext boolean search resultsMichael Stassen25 Jul
      • Re: Fulltext boolean search resultsleegold25 Jul
        • Re: Fulltext boolean search resultsMichael Stassen25 Jul
RE: Errcode: 27J S26 Jul
  • how to deal with a string of categoriesMojtaba Faridzad26 Jul
    • Re: how to deal with a string of categoriesBrent Baisley26 Jul
    • Re: how to deal with a string of categoriesSGreen26 Jul
      • Re: how to deal with a string of categoriesMojtaba Faridzad26 Jul
        • Re: how to deal with a string of categoriesSGreen26 Jul
  • Re: how to deal with a string of categoriesMartijn Tonies26 Jul
  • how to set timeout processMojtaba Faridzad27 Jul
    • /etc/my.cnfWolfgang Riedel27 Jul
      • Re: /etc/my.cnfWolfgang Riedel27 Jul
RE: Errcode: 27J S26 Jul
RE: how to set timeout processVictor Pendleton27 Jul
  • Re: how to set timeout processMojtaba Faridzad27 Jul
  • A possible bugLeonardo Javier Belén27 Jul
RE: Errcode: 27J S27 Jul
Re: A possible bugLeonardo Javier Belén28 Jul