Results 1 to 4 of 4

Thread: Certain search in Fulltext mode does not work

  1. #1
    Join Date
    Aug 2009
    Posts
    59

    Certain search in Fulltext mode does not work

    I can not understand why a certain search in Fulltext mode does not work. Consider a table 'statement':

    id - INT/PK
    enotxt0 - TEXT with index FullText

    Is a recording of that table:

    id = 1
    enotxt0 = "By cause of itself, mean that whose essence involves existence, in other words, what the nature can be conceived existing."

    I can find this record if I want the word "envelope" or "design", and apparently there are any other word except the word "cause" (and any other records containing that word either).
    Same if I try searching "caus *".

    "caus *" brings me back the records that contain "causal" for example, but not those with only "cause".

    An idea of what could explain such strange behavior? A problem of encoding? The word "cause" would have special meaning in SQL? The search query is similar in each case that:

    Code:
    SELECT *, MATCH(enotxt0) AGAINST ("+cause" IN BOOLEAN MODE) AS score FROM forward LEFT OUTER JOIN types ON forward.typid = types.typid WHERE MATCH(enotxt0) AGAINST ("+cause" IN BOOLEAN MODE)

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: Certain search in Fulltext mode does not work

    I thought that because of lack of "cause" could be the length of the word but if I think the MySQL doc, size mini word is 4 letters. Unless the list of words to ignore or customizable mini length or the word?

    MySQL uses a simple filter to separate the text into words. A "word" is any string of characters consisting of letters, numbers,' ' and '_'. Any "word" is in the list of words to be ignored or is too short (3 characters or less) is ignored.
    • A word too short is ignored. The minimum size for a word in the search is 4 letters.
    • The words in the list are ignored. A word is banned eg "the" or "some" or "a" which are considered too common to have an intrinsic value. There is a list of banned words by default.


    The minimum size of words and the list of words to ignore are described in the section Section 12.6.4, "Setting specific search full text of MySQL" on MySQL website.

  3. #3
    Join Date
    Aug 2009
    Posts
    59

    Re: Certain search in Fulltext mode does not work

    Thank you for this track. The length does not cause anything since the further research are going very well with 4-letter word and even 2 or 3 characters + wildcard.

    So I guess the word "cause" must be part of words prohibited. But I do not see how to change this behavior. From what I read (or what I understand), it seems necessary to act on the SQL server itself, and pass a file of words allowed optional. I am able to do this, since I have access to my.cnf. But I must look at all that specifically.

    I would have preferred an option in the application itself.

  4. #4
    Join Date
    May 2008
    Posts
    685

    Re: Certain search in Fulltext mode does not work

    If you want to act on the word length, you add in your mysql config file in the appropriate sections:
    ([mysqld])
    ft_min_word_len=3

    ([myisamchk])
    ft_min_word_len=3

    or you start your mysql daemon with the --ft_min_word_len=3, and you recreate your index.

    Here is an example of 3 characters minimum.

    Then, as regards the list of reserved words, you can tell mysql to eject any word, adding the parameter:
    ([mysqld])
    ft_stopword_file=''

    It's stupid, but it works. Now for my server, there has been no impact on performance.

    For a list of ignored words, I can not find the link.

Similar Threads

  1. How Does A Search Engine Work?
    By McKenzie! in forum Technology & Internet
    Replies: 6
    Last Post: 04-09-2011, 03:10 AM
  2. Search bar of Firefox 4 does not work
    By Damned 2 in forum Technology & Internet
    Replies: 7
    Last Post: 27-03-2011, 08:24 AM
  3. Search Advisor won’t work on Google
    By Raja Ram in forum Networking & Security
    Replies: 5
    Last Post: 18-02-2011, 10:03 PM
  4. Search box in Office 2010 does not work
    By mANICKAVASAN in forum Windows Software
    Replies: 4
    Last Post: 07-12-2010, 07:15 AM
  5. Windows 7 search doesn't work
    By Black Cloud in forum Windows Software
    Replies: 6
    Last Post: 22-08-2010, 04:22 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,868,000.73941 seconds with 16 queries