where match against mysql for more keywords

Discussion in 'MySQL' started by w47w47, Oct 24, 2009.

  1. #1
    how to use the AGAINST () for more keywords? it must find the 2 keywords "two" and "words" even if they in this order "two words" also if the title is "two more words" then it must match too.

    WHERE MATCH (title,content) AGAINST ('two words')

    or

    WHERE MATCH (title,content) AGAINST ('%two%words%')

    or is there some other way ?

    thank you, w47w47
     
    w47w47, Oct 24, 2009 IP
  2. w47w47

    w47w47 Peon

    Messages:
    255
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    ok, i tested it and it seems that both works... just don't know if the % can make some trouble.
     
    w47w47, Oct 24, 2009 IP
  3. heavydev

    heavydev Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    shouldn't make any trouble for you if you are only trying to search those two terms in that order.
    if you wanted to match if it contained 'words two' you would need to rework your query
     
    heavydev, Oct 24, 2009 IP
  4. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #4
    Do not use % in FULLTEXT.
     
    mwasif, Oct 25, 2009 IP