{"id":1826,"date":"2017-08-22T15:11:42","date_gmt":"2017-08-22T07:11:42","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=1826"},"modified":"2017-08-22T15:11:42","modified_gmt":"2017-08-22T07:11:42","slug":"lucene-%e5%88%9b%e5%bb%ba%e7%b4%a2%e5%bc%95%e6%ad%a5%e9%aa%a4","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=1826","title":{"rendered":"lucene \u521b\u5efa\u7d22\u5f15\u6b65\u9aa4"},"content":{"rendered":"<p>\n\t\u7d22\u5f15\u662f\u73b0\u4ee3\u641c\u7d22\u5f15\u64ce\u7684\u6838\u5fc3\uff0c\u5efa\u7acb\u7d22\u5f15\u7684\u8fc7\u7a0b\u5c31\u662f\u628a\u6e90\u6570\u636e\u5904\u7406\u6210\u975e\u5e38\u65b9\u4fbf\u67e5\u8be2\u7684\u7d22\u5f15\u6587\u4ef6\u7684\u8fc7\u7a0b\u3002\u4e3a\u4ec0\u4e48\u7d22\u5f15\u8fd9\u4e48\u91cd\u8981\u5462\uff0c\u8bd5\u60f3\u4f60\u73b0\u5728\u8981\u5728\u5927\u91cf\u7684\u6587\u6863\u4e2d\u641c\u7d22\u542b\u6709\u67d0\u4e2a\u5173\u952e\u8bcd\u7684\u6587\u6863\uff0c\u90a3\u4e48\u5982\u679c\u4e0d\u5efa\u7acb\u7d22\u5f15\u7684\u8bdd\u4f60\u5c31\u9700\u8981\u628a\u8fd9\u4e9b\u6587\u6863\u987a\u5e8f\u7684\u8bfb\u5165\u5185\u5b58\uff0c\u7136\u540e\u68c0\u67e5\u8fd9\u4e2a\u6587\u7ae0\u4e2d\u662f\u4e0d\u662f\u542b\u6709\u8981\u67e5\u627e\u7684\u5173\u952e\u8bcd\uff0c\u8fd9\u6837\u7684\u8bdd\u5c31\u4f1a\u8017\u8d39\u975e\u5e38\u591a\u7684\u65f6\u95f4\uff0c\u60f3\u60f3\u641c\u7d22\u5f15\u64ce\u53ef\u662f\u5728\u6beb\u79d2\u7ea7\u7684\u65f6\u95f4\u5185\u67e5\u627e\u51fa\u8981\u641c\u7d22\u7684\u7ed3\u679c\u7684\u3002\u8fd9\u5c31\u662f\u7531\u4e8e\u5efa\u7acb\u4e86\u7d22\u5f15\u7684\u539f\u56e0\uff0c\u4f60\u53ef\u4ee5\u628a\u7d22\u5f15\u60f3\u8c61\u6210\u8fd9\u6837\u4e00\u79cd\u6570\u636e\u7ed3\u6784\uff0c\u4ed6\u80fd\u591f\u4f7f\u4f60\u5feb\u901f\u7684\u968f\u673a\u8bbf\u95ee\u5b58\u50a8\u5728\u7d22\u5f15\u4e2d\u7684\u5173\u952e\u8bcd\uff0c\u8fdb\u800c\u627e\u5230\u8be5\u5173\u952e\u8bcd\u6240\u5173\u8054\u7684\u6587\u6863\u3002Lucene \u91c7\u7528\u7684\u662f\u4e00\u79cd\u79f0\u4e3a\u53cd\u5411\u7d22\u5f15\uff08inverted index\uff09\u7684\u673a\u5236\u3002\u53cd\u5411\u7d22\u5f15\u5c31\u662f\u8bf4\u6211\u4eec\u7ef4\u62a4\u4e86\u4e00\u4e2a\u8bcd \/ \u77ed\u8bed\u8868\uff0c\u5bf9\u4e8e\u8fd9\u4e2a\u8868\u4e2d\u7684\u6bcf\u4e2a\u8bcd \/ \u77ed\u8bed\uff0c\u90fd\u6709\u4e00\u4e2a\u94fe\u8868\u63cf\u8ff0\u4e86\u6709\u54ea\u4e9b\u6587\u6863\u5305\u542b\u4e86\u8fd9\u4e2a\u8bcd \/ \u77ed\u8bed\u3002\u8fd9\u6837\u5728\u7528\u6237\u8f93\u5165\u67e5\u8be2\u6761\u4ef6\u7684\u65f6\u5019\uff0c\u5c31\u80fd\u975e\u5e38\u5feb\u7684\u5f97\u5230\u641c\u7d22\u7ed3\u679c\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"Lucene \u68c0\u7d22\u8fc7\u7a0b\" src=\"http:\/\/ocuzluml6.bkt.clouddn.com\/lucene001.jpg\" style=\"width: 708px;height: 575px\" \/>\n<\/p>\n<p>\n\t\u90a3\u4e48 Lucene \u662f\u5982\u4f55\u521b\u5efa\u7d22\u5f15\u7684\u5462\uff1f\u672c\u6587\u5c06\u901a\u8fc7\u5177\u4f53\u7684\u6848\u4f8b\u6765\u8fdb\u884c\u8bf4\u660e\u3002\n<\/p>\n<h2>\n\t\u521b\u5efa\u7d22\u5f15<br \/>\n<\/h2>\n<p>\n\t\u5168\u6587\u68c0\u7d22\u7684\u7d22\u5f15\u521b\u5efa\u8fc7\u7a0b\u4e00\u822c\u6709\u4ee5\u4e0b\u51e0\u6b65\uff1a\n<\/p>\n<p>\n\t\u7b2c\u4e00\u6b65\uff1a\u4e00\u4e9b\u8981\u7d22\u5f15\u7684\u539f\u6587\u6863(Document)\u3002\n<\/p>\n<p>\n\t\u4e3a\u4e86\u65b9\u4fbf\u8bf4\u660e\u7d22\u5f15\u521b\u5efa\u8fc7\u7a0b\uff0c\u8fd9\u91cc\u7279\u610f\u7528\u4e24\u4e2a\u6587\u4ef6\u4e3a\u4f8b\uff1a\n<\/p>\n<p>\n\t\u6587\u4ef6\u4e00\uff1aStudents should be allowed to Go out with their friends, but not allowed to drink beer.<br \/>\n\t\u6587\u4ef6\u4e8c\uff1aMy friend Jerry went to school to see his students but found them drunk which is not allowed.\n<\/p>\n<p>\n\t\u7b2c\u4e8c\u6b65\uff1a\u5c06\u539f\u6587\u6863\u4f20\u7ed9\u5206\u8bcd\u7ec4\u4ef6(Tokenizer)\u3002\n<\/p>\n<p>\n\t\u5206\u8bcd\u7ec4\u4ef6(Tokenizer)\u4f1a\u505a\u4ee5\u4e0b\u51e0\u4ef6\u4e8b\u60c5( \u6b64\u8fc7\u7a0b\u79f0\u4e3aTokenize) \uff1a\n<\/p>\n<ol>\n<li>\n\t\t\u5c06\u6587\u6863\u5206\u6210\u4e00\u4e2a\u4e00\u4e2a\u5355\u72ec\u7684\u5355\u8bcd\u3002\n\t<\/li>\n<li>\n\t\t\u53bb\u9664\u6807\u70b9\u7b26\u53f7\u3002\n\t<\/li>\n<li>\n\t\t\u53bb\u9664\u505c\u8bcd(Stop word)\u3002\n\t<\/li>\n<\/ol>\n<p>\n\t\u6240\u8c13\u505c\u8bcd(Stop word)\u5c31\u662f\u4e00\u79cd\u8bed\u8a00\u4e2d\u6700\u666e\u901a\u7684\u4e00\u4e9b\u5355\u8bcd\uff0c\u7531\u4e8e\u6ca1\u6709\u7279\u522b\u7684\u610f\u4e49\uff0c\u56e0\u800c\u5927\u591a\u6570\u60c5\u51b5\u4e0b\u4e0d\u80fd\u6210\u4e3a\u641c\u7d22\u7684\u5173\u952e\u8bcd\uff0c\u56e0\u800c\u521b\u5efa\u7d22\u5f15\u65f6\uff0c\u8fd9\u79cd\u8bcd\u4f1a\u88ab\u53bb\u6389\u800c\u51cf\u5c11\u7d22\u5f15\u7684\u5927\u5c0f\u3002<br \/>\n\t\u82f1\u8bed\u4e2d\u633a\u8bcd(Stop word)\u5982\uff1a&ldquo;the&rdquo;,&ldquo;a&rdquo;\uff0c&ldquo;this&rdquo;\u7b49\u3002\n<\/p>\n<p>\n\t\u5bf9\u4e8e\u6bcf\u4e00\u79cd\u8bed\u8a00\u7684\u5206\u8bcd\u7ec4\u4ef6(Tokenizer)\uff0c\u90fd\u6709\u4e00\u4e2a\u505c\u8bcd(stop word)\u96c6\u5408\u3002\n<\/p>\n<p>\n\t\u7ecf\u8fc7\u5206\u8bcd(Tokenizer) \u540e\u5f97\u5230\u7684\u7ed3\u679c\u79f0\u4e3a\u8bcd\u5143(Token) \u3002\n<\/p>\n<p>\n\t\u5728\u6211\u4eec\u7684\u4f8b\u5b50\u4e2d\uff0c\u4fbf\u5f97\u5230\u4ee5\u4e0b\u8bcd\u5143(Token)\uff1a\n<\/p>\n<pre class=\"brush:plain;\">\r\n&ldquo;Students&rdquo;\uff0c&ldquo;allowed&rdquo;\uff0c&ldquo;go&rdquo;\uff0c&ldquo;their&rdquo;\uff0c&ldquo;friends&rdquo;\uff0c&ldquo;allowed&rdquo;\uff0c&ldquo;drink&rdquo;\uff0c\r\n&ldquo;beer&rdquo;\uff0c&ldquo;My&rdquo;\uff0c&ldquo;friend&rdquo;\uff0c&ldquo;Jerry&rdquo;\uff0c&ldquo;went&rdquo;\uff0c&ldquo;school&rdquo;\uff0c\r\n&ldquo;see&rdquo;\uff0c&ldquo;his&rdquo;\uff0c&ldquo;students&rdquo;\uff0c&ldquo;found&rdquo;\uff0c&ldquo;them&rdquo;\uff0c&ldquo;drunk&rdquo;\uff0c&ldquo;allowed&rdquo;\u3002<\/pre>\n<p>\n\t\u7b2c\u4e09\u6b65\uff1a\u5c06\u5f97\u5230\u7684\u8bcd\u5143(Token)\u4f20\u7ed9\u8bed\u8a00\u5904\u7406\u7ec4\u4ef6(Linguistic Processor)\u3002\n<\/p>\n<p>\n\t\u8bed\u8a00\u5904\u7406\u7ec4\u4ef6(linguistic processor)\u4e3b\u8981\u662f\u5bf9\u5f97\u5230\u7684\u8bcd\u5143(Token)\u505a\u4e00\u4e9b\u540c\u8bed\u8a00\u76f8\u5173\u7684\u5904\u7406\u3002\n<\/p>\n<p>\n\t\u5bf9\u4e8e\u82f1\u8bed\uff0c\u8bed\u8a00\u5904\u7406\u7ec4\u4ef6(Linguistic Processor) \u4e00\u822c\u505a\u4ee5\u4e0b\u51e0\u70b9\uff1a\n<\/p>\n<ol>\n<li>\n\t\t\u53d8\u4e3a\u5c0f\u5199(Lowercase) \u3002\n\t<\/li>\n<li>\n\t\t\u5c06\u5355\u8bcd\u7f29\u51cf\u4e3a\u8bcd\u6839\u5f62\u5f0f\uff0c\u5982&ldquo;cars &rdquo;\u5230&ldquo;car &rdquo;\u7b49\u3002\u8fd9\u79cd\u64cd\u4f5c\u79f0\u4e3a\uff1astemming \u3002\n\t<\/li>\n<li>\n\t\t\u5c06\u5355\u8bcd\u8f6c\u53d8\u4e3a\u8bcd\u6839\u5f62\u5f0f\uff0c\u5982&ldquo;drove &rdquo;\u5230&ldquo;drive &rdquo;\u7b49\u3002\u8fd9\u79cd\u64cd\u4f5c\u79f0\u4e3a\uff1alemmatization \u3002\n\t<\/li>\n<\/ol>\n<p>\n\tStemming \u548c lemmatization\u7684\u5f02\u540c\uff1a\n<\/p>\n<ul>\n<li>\n\t\t\u76f8\u540c\u4e4b\u5904\uff1aStemming\u548clemmatization\u90fd\u8981\u4f7f\u8bcd\u6c47\u6210\u4e3a\u8bcd\u6839\u5f62\u5f0f\u3002\n\t<\/li>\n<li>\n\t\t\u4e24\u8005\u7684\u65b9\u5f0f\u4e0d\u540c\uff1aStemming\u91c7\u7528\u7684\u662f&ldquo;\u7f29\u51cf&rdquo;\u7684\u65b9\u5f0f\uff1a&ldquo;cars&rdquo;\u5230&ldquo;car&rdquo;\uff0c&ldquo;driving&rdquo;\u5230&ldquo;drive&rdquo;\u3002Lemmatization\u91c7\u7528\u7684\u662f&ldquo;\u8f6c\u53d8&rdquo;\u7684\u65b9\u5f0f\uff1a&ldquo;drove&rdquo;\u5230&ldquo;drove&rdquo;\uff0c&ldquo;driving&rdquo;\u5230&ldquo;drive&rdquo;\u3002\n\t<\/li>\n<li>\n\t\t\u4e24\u8005\u7684\u7b97\u6cd5\u4e0d\u540c\uff1aStemming\u4e3b\u8981\u662f\u91c7\u53d6\u67d0\u79cd\u56fa\u5b9a\u7684\u7b97\u6cd5\u6765\u505a\u8fd9\u79cd\u7f29\u51cf\uff0c\u5982\u53bb\u9664&ldquo;s&rdquo;\uff0c\u53bb\u9664&ldquo;ing&rdquo;\u52a0&ldquo;e&rdquo;\uff0c\u5c06&ldquo;ational&rdquo;\u53d8\u4e3a&ldquo;ate&rdquo;\uff0c\u5c06&ldquo;tional&rdquo;\u53d8\u4e3a&ldquo;tion&rdquo;\u3002Lemmatization\u4e3b\u8981\u662f\u91c7\u7528\u4fdd\u5b58\u67d0\u79cd\u5b57\u5178\u7684\u65b9\u5f0f\u505a\u8fd9\u79cd\u8f6c\u53d8\u3002\u6bd4\u5982\u5b57\u5178\u4e2d\u6709&ldquo;driving&rdquo;\u5230&ldquo;drive&rdquo;\uff0c&ldquo;drove&rdquo;\u5230&ldquo;drive&rdquo;\uff0c&ldquo;am, is, are&rdquo;\u5230&ldquo;be&rdquo;\u7684\u6620\u5c04\uff0c\u505a\u8f6c\u53d8\u65f6\uff0c\u53ea\u8981\u67e5\u5b57\u5178\u5c31\u53ef\u4ee5\u4e86\u3002\n\t<\/li>\n<\/ul>\n<p>\n\t\u8bed\u8a00\u5904\u7406\u7ec4\u4ef6(linguistic processor)\u7684\u7ed3\u679c\u79f0\u4e3a\u8bcd(Term) \u3002\n<\/p>\n<p>\n\t\u5728\u6211\u4eec\u7684\u4f8b\u5b50\u4e2d\uff0c\u7ecf\u8fc7\u8bed\u8a00\u5904\u7406\uff0c\u5f97\u5230\u7684\u8bcd(Term)\u5982\u4e0b\uff1a\n<\/p>\n<pre class=\"brush:plain;\">\r\n&ldquo;student&rdquo;\uff0c&ldquo;allow&rdquo;\uff0c&ldquo;go&rdquo;\uff0c&ldquo;their&rdquo;\uff0c&ldquo;friend&rdquo;\uff0c&ldquo;allow&rdquo;\uff0c\r\n&ldquo;drink&rdquo;\uff0c&ldquo;beer&rdquo;\uff0c&ldquo;my&rdquo;\uff0c&ldquo;friend&rdquo;\uff0c&ldquo;jerry&rdquo;\uff0c&ldquo;go&rdquo;\uff0c&ldquo;school&rdquo;\uff0c\r\n&ldquo;see&rdquo;\uff0c&ldquo;his&rdquo;\uff0c&ldquo;student&rdquo;\uff0c&ldquo;find&rdquo;\uff0c&ldquo;them&rdquo;\uff0c&ldquo;drink&rdquo;\uff0c&ldquo;allow&rdquo;\u3002<\/pre>\n<p>\n\t\u4e5f\u6b63\u662f\u56e0\u4e3a\u6709\u8bed\u8a00\u5904\u7406\u7684\u6b65\u9aa4\uff0c\u624d\u80fd\u4f7f\u641c\u7d22drove\uff0c\u800cdrive\u4e5f\u80fd\u88ab\u641c\u7d22\u51fa\u6765\u3002\n<\/p>\n<p>\n\t\u7b2c\u56db\u6b65\uff1a\u5c06\u5f97\u5230\u7684\u8bcd(Term)\u4f20\u7ed9\u7d22\u5f15\u7ec4\u4ef6(Indexer)\u3002\n<\/p>\n<p>\n\t\u7d22\u5f15 \u7ec4\u4ef6(Indexer)\u4e3b\u8981\u505a\u4ee5\u4e0b\u51e0\u4ef6\u4e8b\u60c5\uff1a\n<\/p>\n<p>\n\t\u5229\u7528\u5f97\u5230\u7684\u8bcd(Term)\u521b\u5efa\u4e00\u4e2a\u5b57\u5178\u3002\n<\/p>\n<table border=\"1\" cellpadding=\"2\" cellspacing=\"0\">\n<tbody>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tTerm\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\tDocument ID\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tstudent\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t1\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tallow\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t1\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tgo\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t1\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\ttheir\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t1\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tfriend\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t1\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tallow\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t1\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tdrink\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t1\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tbeer\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t1\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tmy\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tfriend\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tjerry\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tgo\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tschool\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tsee\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\this\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tstudent\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tfind\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tthem\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tdrink\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tallow\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\n\t\u5bf9\u5b57\u5178\u6309\u5b57\u6bcd\u987a\u5e8f\u8fdb\u884c\u6392\u5e8f\u3002\n<\/p>\n<table border=\"1\" cellpadding=\"2\" cellspacing=\"0\">\n<tbody>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tTerm\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\tDocument ID\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tallow\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t1\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tallow\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t1\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tallow\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tbeer\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t1\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tdrink\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t1\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tdrink\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tfind\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tfriend\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t1\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tfriend\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tgo\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t1\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tgo\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\this\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tjerry\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tmy\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tschool\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tsee\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tstudent\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t1\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tstudent\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\ttheir\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t1\n\t\t\t<\/td>\n<\/tr>\n<tr>\n<td align=\"center\" width=\"199\">\n\t\t\t\tthem\n\t\t\t<\/td>\n<td align=\"center\" width=\"199\">\n\t\t\t\t2\n\t\t\t<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\n\t\u5408\u5e76\u76f8\u540c\u7684\u8bcd(Term) \u6210\u4e3a\u6587\u6863\u5012\u6392(Posting List) \u94fe\u8868\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\u5408\u5e76\u76f8\u540c\u7684\u8bcd(Term) \u6210\u4e3a\u6587\u6863\u5012\u6392(Posting List) \u94fe\u8868\" src=\"http:\/\/hi.csdn.net\/attachment\/201002\/1\/3634917_1265048522qXq9.jpg\" style=\"width: 544px;height: 483px\" \/>\n<\/p>\n<p>\n\t\u5728\u6b64\u8868\u4e2d\uff0c\u6709\u51e0\u4e2a\u5b9a\u4e49\uff1a\n<\/p>\n<ul>\n<li>\n\t\tDocument Frequency \u5373\u6587\u6863\u9891\u6b21\uff0c\u8868\u793a\u603b\u5171\u6709\u591a\u5c11\u6587\u4ef6\u5305\u542b\u6b64\u8bcd(Term)\u3002\n\t<\/li>\n<li>\n\t\tFrequency \u5373\u8bcd\u9891\u7387\uff0c\u8868\u793a\u6b64\u6587\u4ef6\u4e2d\u5305\u542b\u4e86\u51e0\u4e2a\u6b64\u8bcd(Term)\u3002\n\t<\/li>\n<\/ul>\n<p>\n\t\u6240\u4ee5\u5bf9\u8bcd(Term) &ldquo;allow&rdquo;\u6765\u8bb2\uff0c\u603b\u5171\u6709\u4e24\u7bc7\u6587\u6863\u5305\u542b\u6b64\u8bcd(Term)\uff0c\u4ece\u800c\u8bcd(Term)\u540e\u9762\u7684\u6587\u6863\u94fe\u8868\u603b\u5171\u6709\u4e24\u9879\uff0c\u7b2c\u4e00\u9879\u8868\u793a\u5305\u542b&ldquo;allow&rdquo;\u7684\u7b2c\u4e00\u7bc7\u6587\u6863\uff0c\u53731\u53f7\u6587\u6863\uff0c\u6b64\u6587\u6863\u4e2d\uff0c&ldquo;allow&rdquo;\u51fa\u73b0\u4e862\u6b21\uff0c\u7b2c\u4e8c\u9879\u8868\u793a\u5305\u542b&ldquo;allow&rdquo;\u7684\u7b2c\u4e8c\u4e2a\u6587\u6863\uff0c\u662f2\u53f7\u6587\u6863\uff0c\u6b64\u6587\u6863\u4e2d\uff0c&ldquo;allow&rdquo;\u51fa\u73b0\u4e861\u6b21\u3002\n<\/p>\n<p>\n\t\u5230\u6b64\u4e3a\u6b62\uff0c\u7d22\u5f15\u5df2\u7ecf\u521b\u5efa\u597d\u4e86\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u5b83\u5f88\u5feb\u7684\u627e\u5230\u6211\u4eec\u60f3\u8981\u7684\u6587\u6863\u3002\n<\/p>\n<p>\n\t\u800c\u4e14\u5728\u6b64\u8fc7\u7a0b\u4e2d\uff0c\u6211\u4eec\u60ca\u559c\u5730\u53d1\u73b0\uff0c\u641c\u7d22&ldquo;drive&rdquo;\uff0c&ldquo;driving&rdquo;\uff0c&ldquo;drove&rdquo;\uff0c&ldquo;driven&rdquo;\u4e5f\u80fd\u591f\u88ab\u641c\u5230\u3002\u56e0\u4e3a\u5728\u6211\u4eec\u7684\u7d22\u5f15\u4e2d\uff0c&ldquo;driving&rdquo;\uff0c&ldquo;drove&rdquo;\uff0c&ldquo;driven&rdquo;\u90fd\u4f1a\u7ecf\u8fc7\u8bed\u8a00\u5904\u7406\u800c\u53d8\u6210&ldquo;drive&rdquo;\uff0c\u5728\u641c\u7d22\u65f6\uff0c\u5982\u679c\u60a8\u8f93\u5165&ldquo;driving&rdquo;\uff0c\u8f93\u5165\u7684\u67e5\u8be2\u8bed\u53e5\u540c\u6837\u7ecf\u8fc7\u6211\u4eec\u8fd9\u91cc\u7684\u4e00\u5230\u4e09\u6b65\uff0c\u4ece\u800c\u53d8\u4e3a\u67e5\u8be2&ldquo;drive&rdquo;\uff0c\u4ece\u800c\u53ef\u4ee5\u641c\u7d22\u5230\u60f3\u8981\u7684\u6587\u6863\u3002<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=1826\">lucene \u521b\u5efa\u7d22\u5f15\u6b65\u9aa4<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>\u7d22\u5f15\u662f\u73b0\u4ee3\u641c\u7d22\u5f15\u64ce\u7684\u6838\u5fc3\uff0c\u5efa\u7acb\u7d22\u5f15\u7684\u8fc7\u7a0b\u5c31\u662f\u628a\u6e90\u6570\u636e\u5904\u7406\u6210\u975e\u5e38\u65b9\u4fbf\u67e5\u8be2\u7684\u7d22\u5f15\u6587\u4ef6\u7684\u8fc7\u7a0b\u3002\u4e3a\u4ec0\u4e48\u7d22\u5f15\u8fd9\u4e48\u91cd\u8981\u5462\uff0c [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[1451,1444,1446,1450,1449],"class_list":["post-1826","post","type-post","status-publish","format-standard","hentry","category-java","tag-indexer","tag-lucene","tag-lucene-","tag-term","tag-tokenizer"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1826"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1826\/revisions"}],"predecessor-version":[{"id":1827,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/1826\/revisions\/1827"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}