Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    June 8th, 2005
    Posts
    68
    Question on Match Function of MySql
    I have been using the Match function of MySql for my search. I read somewhere that the Match function will disregard words that are too short and words that appear too many times.

    My question is how to overide this feature of Match(). I need to show search terms even if they appear a lot of times in the database.

  2. #2
    Member sendmemybill's Avatar
    Join Date
    August 6th, 2005
    Location
    St-Georges, Québec, Canada
    Posts
    105
    I don't know the answer but here is an important part in the mysql documentation that you should read I think. I hope it'll help you.

    Any word that is too short is ignored. The default minimum length of words that are found by full-text searches is four characters.


    Words in the stopword list are ignored. A stopword is a word such as “the” or “some” that is so common that it is considered to have zero semantic value. There is a built-in stopword list, but it can be overwritten by a user-defined list. See Section 12.7.4, “Fine-Tuning MySQL Full-Text Search ”.

    The default minimum word length and stopword list can be changed as described in Section 12.7.4, “Fine-Tuning MySQL Full-Text Search ”.

    Every correct word in the collection and in the query is weighted according to its significance in the collection or query. This way, a word that is present in many documents has a lower weight (and may even have a zero weight), because it has lower semantic value in this particular collection. Conversely, if the word is rare, it receives a higher weight. The weights of the words are then combined to compute the relevance of the row.
    "Effective people are not problem-minded; they're opportunity minded. They feed opportunities and starve problems."

  3. #3
    Moderator MichaelColey's Avatar
    Join Date
    January 18th, 2005
    Location
    Mansfield, TX
    Posts
    16,232
    You have to change some parameters and restart the MySQL server.

    http://dev.mysql.com/doc/mysql/en/fu...ne-tuning.html
    Michael Coley
    Amazing-Bargains.com
     Affiliate Tips | Merchant Best Practices | Affiliate Friendly? | Couponing | CPA Networks? | ABW Tips | Activating Affiliates
    "Education is the most powerful weapon which you can use to change the world." Nelson Mandela

  4. #4
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    4,423
    Another good thing to do, because MySQL will not do this for you - check for smaller word sizes in the user input and disregard them. Giving the user feedback on this is always good (and something I keep meaning to do but must admit haven't always).

    Chet

  5. #5
    Moderator MichaelColey's Avatar
    Join Date
    January 18th, 2005
    Location
    Mansfield, TX
    Posts
    16,232
    I ended up lowering my minimum word size down to 1 letter because I have some 1 letter products (like "W Magazine"). I haven't noticed any downside to doing that. It might make the index a little bigger, but disk space is cheap.
    Michael Coley
    Amazing-Bargains.com
     Affiliate Tips | Merchant Best Practices | Affiliate Friendly? | Couponing | CPA Networks? | ABW Tips | Activating Affiliates
    "Education is the most powerful weapon which you can use to change the world." Nelson Mandela

  6. #6
    ABW Ambassador Snib's Avatar
    Join Date
    January 18th, 2005
    Location
    Virginia
    Posts
    5,303
    If you use a boolean fulltext search, you can get around the problem of ignored words due to repetition. So if a word appears more than 50% of the time, it'll still have some weight in the search query.

    - Scott
    Hatred stirs up strife, But love covers all transgressions.

  7. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Match then delete records in mySQL
    By teezone in forum Programming / Datafeeds / Tools
    Replies: 5
    Last Post: June 15th, 2013, 01:12 PM
  2. Merchant Account TMF and MATCH List Question
    By AffiliatePhil in forum Credit Card processing and other payments
    Replies: 1
    Last Post: February 2nd, 2012, 12:09 PM
  3. Editor Kit Question - Items Don't Match Up
    By Trust in forum eBay Partner Network
    Replies: 3
    Last Post: July 7th, 2008, 11:03 PM
  4. page search function question?
    By Lectrickitty in forum Programming / Datafeeds / Tools
    Replies: 11
    Last Post: March 13th, 2006, 10:37 AM
  5. MySQL question
    By zimmy in forum Programming / Datafeeds / Tools
    Replies: 3
    Last Post: April 4th, 2005, 12:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •