Match the article content link

Source: Internet
Author: User
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

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.