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