Fulltext example not working

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike Reef

    #1

    Fulltext example not working

    I'm trying fulltext searching for the first time [Ver 12.22 Distrib
    4.0.17, for pc-linux (i686)], but I can't figure out why the example
    in the mySQL manual is *not* working.

    mysql> SELECT * FROM articles
    -> WHERE MATCH (title,body) AGAINST ('database');
    Empty set (0.00 sec)

    mysql> SELECT id, MATCH (title,body) AGAINST ('Tutorial')
    -> FROM articles;
    +----+-----------------------------------------+
    | id | MATCH (title,body) AGAINST ('Tutorial') |
    +----+-----------------------------------------+
    | 1 | 0 |
    | 2 | 0 |
    | 3 | 0 |
    | 4 | 0 |
    | 5 | 0 |
    | 6 | 0 |
    +----+-----------------------------------------+
    6 rows in set (0.00 sec)

    What am I doing wrong?
  • leegold2

    #2
    Re: Fulltext example not working

    Mike Reef wrote:
    [color=blue]
    > I'm trying fulltext searching for the first time [Ver 12.22 Distrib
    > 4.0.17, for pc-linux (i686)], but I can't figure out why the example
    > in the mySQL manual is *not* working.[/color]

    Mike,

    DId you fulltext index the fields first?
    Why not try this tutorial first? It'll show
    you the whole deal,



    It's very clear.

    Lee








    [color=blue]
    >
    > mysql> SELECT * FROM articles
    > -> WHERE MATCH (title,body) AGAINST ('database');
    > Empty set (0.00 sec)
    >
    > mysql> SELECT id, MATCH (title,body) AGAINST ('Tutorial')
    > -> FROM articles;
    > +----+-----------------------------------------+
    > | id | MATCH (title,body) AGAINST ('Tutorial') |
    > +----+-----------------------------------------+
    > | 1 | 0 |
    > | 2 | 0 |
    > | 3 | 0 |
    > | 4 | 0 |
    > | 5 | 0 |
    > | 6 | 0 |
    > +----+-----------------------------------------+
    > 6 rows in set (0.00 sec)
    >
    > What am I doing wrong?[/color]

    Comment

    Working...