MySQL Full-Text Search support

Source: Internet
Author: User
Tags mysql tutorial

  1. MySQL Full-Text Search support
  2. More than 4.0 MySQL MyISAM engine supports full text search, which can be used to support search on a typical small website or blog.
  3. So how to use, simple look:
  4. 1. Create a table that specifies the columns that support fulltext
  5. CREATE TABLE Articles (
  6. ID INT UNSIGNED auto_increment not NULL PRIMARY KEY,
  7. Title VARCHAR (200),
  8. Body TEXT,
  9. Fulltext (Title,body)
  10. );
  11. 2. Insert some data as a test
  12. INSERT into articles (Title,body) VALUES
  13. (' MySQL Tutorial ', ' DBMS stands for DataBase ... '),
  14. (' How to use the MySQL well ', ' after you went through a ... '),
  15. (' Optimizing MySQL ', ' in this tutorial we'll show ... '),
  16. (' 1001 MySQL Tricks ', ' 1. Never run mysqld as root. 2 ... '),
  17. (' MySQL vs. Yoursql ', ' in the following database comparison ... '),
  18. (' MySQL Security ', ' when configured properly, MySQL ... ');
  19. 3.select Query fulltext Columns
  20. SELECT * from articles
  21. WHERE MATCH (title,body) against (' database ');
  22. Query Result:
  23. 5 MySQL vs. Yoursql in the following database comparison ...
  24. 1 MySQL Tutorial DBMS stands for DataBase ...
  25. A Boolean statement in a full-text query, +-as with normal search engine syntax
  26. SELECT * from articles WHERE MATCH (title,body)
  27. Against (' +mysql-yoursql ' in BOOLEAN MODE);
  28. InnoDB does not support Fulltext, of course, you can use Http://sphinxsearch.com/sphinx to dump database data to support full-text search.

MySQL Full-Text Search support

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.