SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Fulltext indexs and searching troubles

    Hello everybody,

    I'm trying to set up a small search method for my database,
    I've followed the instructions at mysql.com about fulltext indexs etc.

    now this line works

    select * form data where match (name,town,area) against ("north");

    however this line doesn't

    select * form data where match (name,town,area) against ("nor*");

    Anyone got any ideas? or know of a easier way of searhing a mysql db?

    Cheers

    Resis

  2. #2
    SitePoint Zealot
    Join Date
    Jul 2002
    Posts
    144
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am not an expert programmer or anything. I don tknow if I can even help you, but I am sure it will be better for us to see the error message with it.

    Spaz
    Just a little boy trying to make his way into the world...
    ~~~Spaz Boy
    Programmer + Gamer = ProGamer

  3. #3
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    the error message

    heres the message


    ERROR 1191: Can't find FULLTEXT index matching the column list

    cheers

    Resis

  4. #4
    SitePoint Wizard westmich's Avatar
    Join Date
    Mar 2000
    Location
    Muskegon, MI
    Posts
    2,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not too knowledgable on MySQL, but I believe you need to build the text catalogs first (catalog is a term used SQL Server).

    From MySQL docs - http://www.mysql.com/doc/en/Fulltext_Search.html

    Code:
    mysql> CREATE TABLE articles (
        ->   id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
        ->   title VARCHAR(200),
        ->   body TEXT,
        ->   FULLTEXT (title,body)
        -> );
    
    mysql> SELECT * FROM articles
        ->          WHERE MATCH (title,body) AGAINST ('database');
    Westmich
    Smart Web Solutions for Smart Clients
    http://www.mindscapecreative.com

  5. #5
    SitePoint Member
    Join Date
    Aug 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup i've done that, but still no luck!

  6. #6
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Fulltext indexs and searching troubles

    Originally posted by Resis
    now this line works

    select * form data where match (name,town,area) against ("north");

    however this line doesn't

    select * form data where match (name,town,area) against ("nor*");
    first, you have "form" there instead of "FROM."

    you have the FULLTEXT index on exactly the columns (name, town, area) in that order? 'cause your error makes it sound like that's a problem. but, if the first one works... the second one won't match anything anyway in MySQL 3.23. you can't use * as a wild-card. that means the search term will be "nor" which is 3 characters or less and is ignored.

    that's my take.
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR


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
  •