What you are talking about should belong to full-text search. MYSQL only supports full-text search for MYISAM and does not support Chinese. There are other third-party methods that use search engines and MYSQL to achieve high-performance full-text retrieval solutions. For details, please refer to: http://wenku.baidu.com/link?u...
You are talking about full-text indexing. InnoDB in Mysql5.7 supports full-text indexing (I don’t know about other versions), and has a built-in ngram full-text search plug-in to support Chinese word segmentation.
When creating a table: FULLTEXT (字段1,字段2) WITH PARSER ngram When querying:
SELECT COUNT(*) FROM table1
WHERE MATCH (字段1,字段2) AGAINST ('关键词');
For more details, please visit the official website
Well, you can use elasticsearch to search. Of course, this does not belong to mysql. MySQL itself is used for storage. For complex search word segmentation and so on, it is better to use professional ones. Many e-commerce companies also use this.
What you are talking about should belong to full-text search.
MYSQL only supports full-text search for MYISAM and does not support Chinese. There are other third-party methods that use search engines and MYSQL to achieve high-performance full-text retrieval solutions.
For details, please refer to:
http://wenku.baidu.com/link?u...
Can you describe the requirements in more detail? What kind of functional requirements do you want to make?
You are talking about full-text indexing. InnoDB in Mysql5.7 supports full-text indexing (I don’t know about other versions), and has a built-in ngram full-text search plug-in to support Chinese word segmentation.
When creating a table:
FULLTEXT (字段1,字段2) WITH PARSER ngram
When querying:
For more details, please visit the official website
Well, you can use
elasticsearch
to search. Of course, this does not belong to mysql. MySQL itself is used for storage. For complex search word segmentation and so on, it is better to use professional ones. Many e-commerce companies also use this.