If the link to match the content of an article needs the following function on my website, this function is similar to Baidu encyclopedia, that is, keyword matching of the content of the article. Each time you add an article, you need to add a link to some keywords in the article. The keywords to be queried from another table are named jingdian_table with a title, each time I add an article, I need to check whether the title in jingdian_table appears in the article I added. if it appears, I add a link to it if it matches the content link of the article.
Now I need the following function for my website. This function is similar to Baidu encyclopedia, that is, keyword matching of the article content.
Each time you add an article, you need to add a link to some keywords in the article.
This table is called jingdian_table with a title and a link.
Each time I add an article, I need to check whether the title in jingdian_table appears in the article I added. if so, I add a link. Now my jingdian_table contains more than 20 thousand pieces of data. how can I quickly find it.
Please give me some advice. thank you.
PHP word segmentation
------ Solution --------------------
If the keyword table is large, full-text search is required. However, the full-text search index of mysql does not support Chinese characters, and the flexibility is a little strange.
If you use a third-party full-text search engine, installation may be a problem
20 thousand data entries are not big and can be implemented using the trie algorithm. You just need to construct a dictionary library and cache it.
------ Solution --------------------
You can find