MySQL Full-text search support, MySQL 5.6.4 supports InnoDB full-text Search and class Memcache NoSQL support

Source: Internet
Author: User
Tags memcached mysql tutorial mysql version

Background: Make a personal blog full-text search to use like what, now MySQL version number is more than 5.6.4 also supported the full-text search of InnoDB, just checked the current version number to MySQL Community Server 5.6.19, so, Some small applications can use it for full-text searches, such as Sphinx and Lucene, which require configuration or development, saving costs.

Here's an original MySQL full-text search article, MySQL full-text search feature:
http://blog.csdn.net/bravekingzhang/article/details/6727541

In-depth understanding of MySQL full-text indexing:
Http://www.jb51.net/article/37738.htm

Why to set Mysql ft_min_word_len=1:
http://blog.csdn.net/shilian_h/article/details/6215537


MySQL Full-Text Search support brief:
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.
So how to use, simple look:
1. Create a table that specifies the columns that support fulltext
CREATE TABLE Articles (
ID INT UNSIGNED auto_increment not NULL PRIMARY KEY,
Title VARCHAR (200),
Body TEXT,
Fulltext (Title,body)
);
2. Insert some data as a test
INSERT into articles (Title,body) VALUES
(' MySQL Tutorial ', ' DBMS stands for DataBase ... '),
(' How to use the MySQL well ', ' after you went through a ... '),
(' Optimizing MySQL ', ' in this tutorial we'll show ... '),
(' 1001 MySQL Tricks ', ' 1. Never run mysqld as root. 2 ... '),
(' MySQL vs. Yoursql ', ' in the following database comparison ... '),
(' MySQL Security ', ' when configured properly, MySQL ... ');
3.select Query fulltext Columns
SELECT * from articles
WHERE MATCH (title,body) against (' database ');
Query Result:
5 MySQL vs. Yoursql in the following database comparison ...
1 MySQL Tutorial DBMS stands for DataBase ...
A Boolean statement in a full-text query, +-as with normal search engine syntax
SELECT * from articles WHERE MATCH (title,body)
Against (' +mysql-yoursql ' in BOOLEAN MODE);
InnoDB does not support Fulltext, of course, you can use Http://sphinxsearch.com/sphinx to dump database data to support full-text search.
Original address: http://www.javaarch.net/jiagoushi/700.htm

PostScript, MySQL 5.6.4 In addition to the InnoDB engine Full-text index support, or with the Zhang Yi brothers Sphinx+mysql-based TENS data full-text search (search engine) architecture design: http://blog.s135.com/post/360/
Q:
I want to use Match (...) at query time. Against (...) syntax, but my data table engine is InnoDB, and when I create FULLTEXT index, I return the prompt with the Used table type doesn ' t support fulltext indexes.
What I want to ask is, is it possible to use the Fulltext engine in the InnoDB engine? Are there any alternatives? You can use Match (...) Against (...) Grammar?
A:
MySQL 5.6.4 added the Full-text index support for the InnoDB engine.
If the MySQL version cannot be upgraded:
Third-party solutions such as Lucene (Elasticsearch easier to deploy) or Sphinx are recommended.
InnoDB does not support full-text indexing of fulltext types, but InnoDB can support full-text indexing using Sphinx plug-ins, and it works better.
Sphinx is an open source software that provides API interfaces in multiple languages to optimize MySQL's various queries.
If the table is not updated frequently, the query volume is small, and the time is high, you can use triggers, timed tasks, or other similar DBA techniques to create mirror tables that support full-text indexing (such as the MyISAM type), and the code churn is smaller.
MySQL5.6 InnoDB fulltextindexes Research test:
http://blog.csdn.net/zyz511919766/article/details/12780173

MySQL 5.6.4 supports NoSQL:
In the latest mysql-5.6.4-labs-innodb-memcached, a simple nosql function given to Key/value is implemented, the main principle
Is that mysqld listens to 11211 ports in addition to listening on Port 3306. Make mysqld and memcached services in the same process. Pass
A database, table, and field mapping that inserts data that is cached in Memcache into the mapped table. Three tables are available in the installation package: containers
Cache_policies and config_options, table containers provides a mapping relationship, table Cache_policies provides three ways of storage (
Innodb_only data is inserted into tables only, cache_only caches data only, caching cache data and inserts tables), table Config_options provides
A default delimiter "|", meaning that if col1,col2 is defined in the Values field of table containers ... field, that is, when you set the cache value
It can be in the form of Val1|val2, which will insert val1 into the Col1,val2 insert into the col2.

From: http://blog.csdn.net/sunny5211/article/details/7357893






This is not a full-text search, just a traditional full-table search. If you use MySQL's full-text check, it's not going to take that long on 2 million datasets.
Here's how to use MySQL full-text search:
1. Configure MySQL parameter ft_min_word_len=1
Create the fulltext index in the text field of the datasheet.
2. Break the original text (processed into a space-delimited string), which can be implemented using some open source participle modules. And then import it into the MySQL data table.
3. Use MYSQ select * from tb1 where title match ' word ' for retrieval.
From: http://www.oschina.net/question/123890_133459

justwinit@ to the East blog focus on the beauty of Web application Architecture---Architecture is the beauty of the state | The beauty of application lies in the charm
Address: http://www.justwinit.cn/post/7253/
All rights reserved. The author and original source and this statement must be indicated in the form of a link in the reprint!

MySQL Full-text search support, MySQL 5.6.4 supports InnoDB full-text Search and class Memcache NoSQL 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.