How to improve the performance of keyword matching

Source: Internet
Author: User
Suppose there are 20 million or more strings, and there are 1000 keywords. Now you need to detect which keywords all strings hit, of course, the simplest way is a string of a string to be used to match all the keywords, but this efficiency will be very slow, is there any good way to improve the matching efficiency?

Reply content:

Suppose there are 20 million or more strings, and there are 1000 keywords. Now you need to detect which keywords all strings hit, of course, the simplest way is a string of a string to be used to match all the keywords, but this efficiency will be very slow, is there any good way to improve the matching efficiency?

Http://blog.41ms.com/post/41.html

I am using now, you only 1000 keywords, I have 200W keyword, now supports 500 concurrent per second, should be able to meet your

Using PHP extension trie_filter to do Chinese sensitive word filtering

Http://www.2cto.com/kf/201401/273359.html

Ac_bnfa

https://segmentfault.com/q/1010000004159234/a-1020000004162767

Look, this should be helpful to you. String matching algorithm

With Elasticsearch

  • 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.