MySQL 5.7 Reference Manual

Nowadays, MySQL is the most popular database system used with PHP among so many developers. PHP combined with MySQL are cross-platform which you can develop in Windows and serve on a Unix platform. Basically, tables stores the data in a MySQL database. A table consists columns and rows which is a collection of related data. Databases are useful for storing information categorically. My SQL is an open source relational database management system (RDBMS).  So, whether you are a mobile or web developer, it is never too late to learn more about MySQL 5.7. Here are the details and don’t hesitate to check them out!

MySQL has supported for full-text indexing and searching, such as follows:

  • A full-text index in MySQL is an index of type FULLTEXT.
  • Only with InnoDB or MyISAM tables, you can create Full-text indexes, and can be created only for CHAR, VARCHAR, or TEXT
  • As of MySQL 5.7.6, My SQL provides a built-in full-text ngram parser. It supports Chinese, Japanese, and Korean (CJK), and an installable MeCab full-text parser plugin for Japanese. Parsing differences are outlined in Section 13.9.8, “ngram Full-Text parser”. Then, Section 13.9.9, “MeCab Full-Text Parser Plugin”.
  • CREATE TABLE provides A FULLTEXT index definition or adds later using ALTER TABLE orCREATE INDEX.
  • To load large data sets faster, you can use a table that has no FULLTEXT index. Then, create the index to load data into a table that has an existing FULLTEXT index.

By using  MATCH() … AGAINST syntax, you can perform full-text searching. MATCH() takes a comma-separated list that names the columns to be searched. You can use AGAINST to take a string and an optional modifier that indicates what type of search to perform. Create search string that is constant during query evaluation through string value. This rules out, for example, a table column because that can differ for each now.

There are three types of full-text searches:

  • A natural language search interprets search string as a phrase in natural human language. There are no special operators. The stop word list applies if the modifier gives or not give the IN NATURAL LANGUAGE MODE. Full-text searches are natural language searches.
  • Using the rules of a special query language, a Boolean search interprets the search string. The string contains the words to search for. It can also contain operators that specify requirements such that a word must be present or absent in matching rows. It also should be weighted higher or lower than usual. In Boolean search interprets, search index will omit certain common words. Besides, some words do not match if present in the search string. The IN BOOLEAN MODE modifier specifies a Boolean search.
  • A modification of a natural language search is a query expansion. To perform a natural language search, you can use search string. After adding the words to the search string, then words from the most relevant rows returned by the search. The search is done again. From the second search, the query returns the rows.
Mario:
Related Post