{"id":26137,"date":"2020-05-17T02:27:45","date_gmt":"2020-05-16T18:27:45","guid":{"rendered":"http:\/\/www.zhushiyao.com\/?p=26137"},"modified":"2020-05-17T02:28:36","modified_gmt":"2020-05-16T18:28:36","slug":"c40cadd362","status":"publish","type":"post","link":"http:\/\/www.zhushiyao.com\/?p=26137","title":{"rendered":"Elasticsearch\u539f\u7406\u5256\u6790"},"content":{"rendered":"<div class=\"bpp-post-content\">\n<section>\n<p style=\"text-align: justify; margin: 0px; padding: 0px; clear: both; color: #333333; font-size: 17px; font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\">\n<section>\n<section style=\"width: 100%;\">\n<section style=\"display: flex; justify-content: center; align-items: center;\">\n<section style=\"width: 100%; height: 6px; border-top: 3px solid #79cec9; border-bottom: 1px solid #79cec9; overflow: hidden; box-sizing: border-box;\"><\/section>\n<section style=\"width: 25px; margin: 0px 6px;\">\n<section style=\"width: 25px;\"><img decoding=\"async\" style=\"width: 100%; display: block;\" title=\"Elasticsearch\u539f\u7406\u5256\u6790\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/05\/1-1589653665.png\" alt=\"Elasticsearch\u539f\u7406\u5256\u6790\" \/><\/section>\n<\/section>\n<section style=\"width: 100%; height: 6px; border-top: 3px solid #79cec9; border-bottom: 1px solid #79cec9; overflow: hidden; box-sizing: border-box;\"><\/section>\n<\/section>\n<section style=\"font-size: 14px; text-align: justify; letter-spacing: 1.5px; line-height: 1.75em; color: #3e3e3e; padding: 1em 0px; box-sizing: border-box;\">\u8fd1\u671fElasticsearch\u7684\u95ee\u9898\u4e0d\u5c11\uff0c\u7279\u522b\u662f\u524d\u4e9b\u65e5\u5b50\u7684108\u4ebf\u548c50w\u6570\u636e\u6cc4\u9732\u7684\u5b89\u5168\u95ee\u9898\u3002<\/p>\n<\/section>\n<section style=\"display: flex; justify-content: center; align-items: center;\">\n<section style=\"width: 100%; height: 6px; border-top: 3px solid #79cec9; border-bottom: 1px solid #79cec9; overflow: hidden; box-sizing: border-box;\"><\/section>\n<section style=\"width: 25px; margin: 0px 6px;\">\n<section style=\"width: 25px;\"><img decoding=\"async\" style=\"width: 100%; display: block;\" title=\"Elasticsearch\u539f\u7406\u5256\u6790\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/05\/10-1589653665.png\" alt=\"Elasticsearch\u539f\u7406\u5256\u6790\" \/><\/section>\n<\/section>\n<section style=\"width: 100%; height: 6px; border-top: 3px solid #79cec9; border-bottom: 1px solid #79cec9; overflow: hidden; box-sizing: border-box;\"><\/section>\n<\/section>\n<\/section>\n<\/section>\n<p style=\"text-align: justify; margin: 0px; padding: 0px; clear: both; color: #333333; font-size: 17px; font-family: mp-quote, -apple-system-font, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif;\">\n<\/section>\n<section style=\"text-align: left; text-indent: 0em; line-height: 1.5em;\"><span style=\"font-size: 20px;\"><strong><span style=\"caret-color: red;\">Master\/Slave\u67b6\u6784 VS P2P \u73af\u5f62\u7ed3\u6784<\/span><br style=\"text-indent: 2em;\" \/><\/strong><\/span><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc; margin: 0px; padding: 0px 0px 0px 30px;\">\n<li>\n<section style=\"text-align: left; text-indent: 0em; line-height: 1.5em;\">Master-Slave<\/section>\n<\/li>\n<\/ul>\n<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">Master \u8282\u70b9\u8d1f\u8d23\u7ba1\u7406\u6574\u4e2a\u7cfb\u7edf,\u76d1\u89c6 slave \u8282\u70b9\u7684\u8fd0\u884c\u72b6\u6001,\u540c\u65f6\u4e3a\u5176\u4e0b\u7684\u6bcf\u4e00\u4e2a slave \u8282\u70b9\u5206\u914d\u5b58\u50a8\u7684\u8303\u56f4,\u662f\u67e5\u8be2\u548c\u5199\u5165\u7684\u5165\u53e3.master \u8282\u70b9\u4e00\u822c\u5168\u5c40\u53ea\u6709 1\u4e2a,\u8be5\u8282\u70b9\u7684\u72b6\u6001\u5c06\u4e25\u91cd\u5f71\u54cd\u6574\u4e2a\u7cfb\u7edf\u7684\u6027\u80fd,\u5f53 master \u8282\u70b9\u5b95\u673a\u65f6,\u4f1a\u5f15\u8d77\u6574\u4e2a\u7cfb\u7edf\u7684\u762b\u75ea.\u5b9e\u8df5\u4e2d,\u7ecf\u5e38\u8bbe\u7f6e\u591a\u4e2a\u526f\u672c master \u8282\u70b9,\u901a\u8fc7\u8054\u673a\u70ed\u5907\u7684\u65b9\u5f0f\u63d0\u9ad8\u7cfb\u7edf\u7684\u5bb9\u9519\u6027.<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc; margin: 0px; padding: 0px 0px 0px 30px;\">\n<li>\n<section style=\"text-indent: 0em; line-height: 1.5em;\">P2P \u73af\u5f62\u7ed3\u6784<\/section>\n<\/li>\n<\/ul>\n<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">P2P\u7ed3\u6784\u4e2d\u6ca1\u6709master\u8282\u70b9<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">Master-Slave\u7ed3\u6784\u7684\u7cfb\u7edf\u8bbe\u8ba1\u7b80\u5355,\u53ef\u63a7\u6027\u597d,\u4f46 master<span style=\"text-indent: 2em;\">\u4e2d\u5fc3\u8282\u70b9\u6613\u6210\u4e3a\u74f6\u9888(bigtable\u4e3amaster\u8282\u70b9\u4e0d\u6210\u4e3a\u74f6\u9888\u505a\u4e86\u5f88\u591a\u63aa\u65bd);P2P\u73af\u5f62\u7ed3\u6784\u7684\u7cfb\u7edf\u65e0\u4e2d\u5fc3\u8282\u70b9,\u81ea\u534f\u8c03\u6027\u597d,\u6269\u5c55\u65b9\u4fbf,\u4f46\u53ef\u63a7\u6027\u8f83\u5dee,\u4e14\u7cfb\u7edf\u8bbe\u8ba1\u6bd4master-slave \u7ed3\u6784\u7684\u7cfb\u7edf\u8981\u590d\u6742.<\/span><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">Hbase,bigtable,es\u548cHDFS\u4e00\u6837\u91c7\u7528master\/slave\u67b6\u6784\u3002<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">hbase\u5b58\u591a\u8bfb\u5c11\uff0c\u4e0d\u9002\u5408\u9ad8\u5e76\u53d1\u67e5\u8be2\uff0c\u9002\u5408\u5b58\u6570\u636e\uff1bes\u662f\u5168\u6587\u68c0\u7d22\uff0c\u9002\u5408\u65e5\u5fd7\u5206\u6790\u65e5\u5fd7\u7edf\u8ba1\u4e4b\u7c7b\u3002<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-align: left; text-indent: 0em; line-height: 1.5em;\"><strong><span style=\"font-size: 20px;\">ES\u6982\u8ff0<\/span><\/strong><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">ES \u5728 Master \u88ab\u9009\u4e3e\u4e4b\u524d\u662f\u4e00\u4e2a P2P \u7684\u7cfb\u7edf\uff0c\u4f46\u662f\u5f53 Master \u88ab\u9009\u53d6\u540e\uff0c\u5b83\u7684\u7ba1\u7406\u672c\u8d28\u4e0a\u662f Master \u548c slave\u7684\u6a21\u5f0f\u3002<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">Elasticsearch \u770b\u540d\u5b57\u5c31\u80fd\u5927\u6982\u4e86\u89e3\u4e0b\u5b83\u662f\u4e00\u4e2a\u5f39\u6027\u7684\u641c\u7d22\u5f15\u64ce\u3002\u9996\u5148\u5f39\u6027\u9690\u542b\u7684\u610f\u601d\u662f\u5206\u5e03\u5f0f\uff0c\u5355\u673a\u7cfb\u7edf\u662f\u6ca1\u6cd5\u5f39\u8d77\u6765\u7684\uff0c\u7136\u540e\u52a0\u4e0a\u7075\u6d3b\u7684\u4f38\u7f29\u673a\u5236\uff0c\u5c31\u662f\u8fd9\u91cc\u7684 Elastic \u5305\u542b\u7684\u610f\u601d\u3002\u5b83\u7684\u641c\u7d22\u5b58\u50a8\u529f\u80fd\u4e3b\u8981\u662f Lucene \u63d0\u4f9b\u7684\uff0cLucene \u76f8\u5f53\u4e8e\u5176\u5b58\u50a8\u5f15\u64ce\uff0c\u5b83\u5728\u4e4b\u4e0a\u5c01\u88c5\u4e86\u7d22\u5f15\uff0c\u67e5\u8be2\uff0c\u4ee5\u53ca\u5206\u5e03\u5f0f\u76f8\u5173\u7684\u63a5\u53e3\u3002<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">Elasticsearch\u662f\u4e00\u4e2a\u5b9e\u65f6(\u7d22\u5f15\u6570\u636e\u5230\u80fd\u88ab\u641c\u7d22\u5927\u69821s\u5de6\u53f3)\u7684\u5206\u5e03\u5f0f\u641c\u7d22\u548c\u5206\u6790\u5f15\u64ce\uff0c\u4e3b\u8981\u7528\u4e8e\u5168\u6587\u641c\u7d22\uff0c\u7ed3\u6784\u5316\u641c\u7d22\u4ee5\u53ca\u5206\u6790\u3002Elasticsearch\u4f7f\u7528Lucene\u4f5c\u4e3a\u5185\u90e8\u5f15\u64ce\uff0c\u4f46\u662f\u5728\u4f7f\u7528\u5b83\u505a\u5168\u6587\u641c\u7d22\u65f6\uff0c\u53ea\u9700\u8981\u4f7f\u7528\u7edf\u4e00\u5f00\u53d1\u597d\u7684API\u5373\u53ef\uff0c\u800c\u4e0d\u9700\u8981\u4e86\u89e3\u5176\u80cc\u540e\u590d\u6742\u7684Lucene\u7684\u8fd0\u884c\u539f\u7406\uff0c\u53ef\u4ee5\u8bf4\u662f\u4e00\u4e2a\u5f00\u7bb1\u5373\u7528\u7684\u5206\u5e03\u5f0f\u5b9e\u73b0\uff0c\u5176\u5185\u90e8\u5b9a\u4e49\u4e86\u5927\u91cf\u7684\u9ed8\u8ba4\u503c\u3002Elasticsearch\u5e76\u4e0d\u4ec5\u4ec5\u662fLucene\u8fd9\u4e48\u7b80\u5355\uff0c\u5b83\u4e0d\u4f46\u5305\u62ec\u4e86\u5168\u6587\u641c\u7d22\u529f\u80fd\uff0c\u8fd8\u53ef\u4ee5\u8fdb\u884c\u4ee5\u4e0b\u5de5\u4f5c:<\/section>\n<section>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc; margin: 0px; padding: 0px 0px 0px 30px;\">\n<li>\n<section style=\"line-height: 1.5em;\"><span style=\"text-indent: 0em;\">\u5206\u5e03\u5f0f\u5b9e\u65f6\u6587\u4ef6\u5b58\u50a8\uff0c\u5e76\u5c06\u6bcf\u4e00\u4e2a\u5b57\u6bb5\u90fd\u7f16\u5165\u7d22\u5f15\uff0c\u4f7f\u5176\u53ef\u4ee5\u88ab\u641c\u7d22\u3002<\/span><\/section>\n<\/li>\n<li>\n<section style=\"line-height: 1.5em;\"><span style=\"text-indent: 0em;\">\u5b9e\u65f6\u5206\u6790\u7684\u5206\u5e03\u5f0f\u641c\u7d22\u5f15\u64ce\u3002<\/span><\/section>\n<\/li>\n<li>\n<section style=\"line-height: 1.5em;\"><span style=\"text-indent: 0em;\">\u53ef\u4ee5\u6269\u5c55\u5230\u4e0a\u767e\u53f0\u670d\u52a1\u5668\uff0c\u5904\u7406PB\u7ea7\u522b\u7684\u7ed3\u6784\u5316\u6216\u975e\u7ed3\u6784\u5316\u6570\u636e\u3002<\/span><\/section>\n<\/li>\n<\/ul>\n<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">ES\u63d0\u4f9b\u4e86\u4e24\u5957API\uff08\u5185\u90e8\u8c03\u7528\u90fd\u6307\u5411\u540c\u4e00\u4e2a\u5730\u65b9\uff09\u5206\u522b\u662f\u57fa\u4e8ecurl\u7684rest API\u548cJava API\uff0c\u901a\u8fc7API\u4e0d\u4ec5\u80fd\u5bf9\u6570\u636e\u7684CURD\u8fdb\u884c\u5904\u7406\uff0c\u8fd8\u80fd\u5bf9\u7d22\u5f15\u53caes\u96c6\u7fa4\u8fdb\u884c\u5173\u8054<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-align: left; text-indent: 0em; font-size: 16px; line-height: 1.5em;\"><strong><span style=\"font-size: 20px;\">ES \u7684\u57fa\u672c\u6982\u5ff5<\/span><\/strong><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">Elasticsearch\u7684\u5e95\u5c42\u641c\u7d22\u662f\u4ee5lucene\u6765\u5b9e\u73b0\u7684\u3002es\u5176\u4e3b\u8981\u662f\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5206\u5e03\u5f0f\u7684\u6846\u67b6\u6765\u6269\u5c55\u4e86lucene\uff0c\u4ece\u800c\u5b9e\u73b0\u5927\u6570\u636e\u91cf\u7684\uff0c\u5206\u5e03\u5f0f\u641c\u7d22\u529f\u80fd\u3002\u5176\u5b9e\u73b0\u601d\u60f3\u5f88\u7b80\u5355\uff0c\u5c06\u5927\u6570\u636e\u91cf\u5206\u800c\u6cbb\u4e4b\uff0c\u54c8\u5e0c\u5206\u6210\u591a\u4efd\uff0c\u7136\u540e\u5bf9\u6bcf\u4e00\u4efd\u8fdb\u884c\u201clucene\u5904\u7406\u201d\u2014\u2014\u7528lucene\u7d22\u5f15\u3001\u68c0\u7d22\uff0c\u6700\u540e\u5c06\u6bcf\u4efd\u7ed3\u679c\u5408\u5e76\u8fd4\u56de\u3002<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 0em; line-height: 1.5em;\"><img decoding=\"async\" style=\"width: 100%; caret-color: red; outline-width: initial; margin-top: 24px; margin-bottom: 24px; overflow-wrap: break-word; cursor: zoom-in; color: #4d4d4d; font-variant-ligatures: common-ligatures; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; height: auto; border: 0px none initial;\" title=\"Elasticsearch\u539f\u7406\u5256\u6790\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/05\/8-1589653665.png\" alt=\"Elasticsearch\u539f\u7406\u5256\u6790\" \/><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<p style=\"text-indent: 2em; line-height: 1.75em;\">Lucene\u4e2d\u5305\u542b\u4e86\u56db\u79cd\u57fa\u672c\u6570\u636e\u7c7b\u578b\uff0c\u5206\u522b\u662f\uff1a<\/p>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">Index\uff1a\u7d22\u5f15\uff0c\u7531\u5f88\u591a\u7684Document\u7ec4\u6210\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">Document\uff1a\u7531\u5f88\u591a\u7684Field\u7ec4\u6210\uff0c\u662fIndex\u548cSearch\u7684\u6700\u5c0f\u5355\u4f4d\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">Field\uff1a\u7531\u5f88\u591a\u7684Term\u7ec4\u6210\uff0c\u5305\u62ecField Name\u548cField Value\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">Term\uff1a\u7531\u5f88\u591a\u7684\u5b57\u8282\u7ec4\u6210\u3002\u4e00\u822c\u5c06Text\u7c7b\u578b\u7684Field Value\u5206\u8bcd\u4e4b\u540e\u7684\u6bcf\u4e2a\u6700\u5c0f\u5355\u5143\u53eb\u505aTerm\u3002<\/p>\n<\/li>\n<\/ul>\n<section style=\"line-height: 1.5em;\"><img decoding=\"async\" style=\"color: #4d4d4d; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; font-size: 16px; font-variant-ligatures: common-ligatures; text-indent: 0em; width: auto; box-sizing: border-box; outline: none; margin-top: 24px; margin-bottom: 24px; overflow-wrap: break-word; cursor: zoom-in; border: 0px none initial;\" title=\"Elasticsearch\u539f\u7406\u5256\u6790\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/05\/9-1589653665.png\" alt=\"Elasticsearch\u539f\u7406\u5256\u6790\" \/><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-align: left; text-indent: 0em; font-size: 16px; line-height: 1.5em;\"><strong><span style=\"font-size: 20px;\">ES \u4e2d\u7684\u51e0\u4e2a\u6838\u5fc3\u6982\u5ff5<\/span><\/strong><\/section>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">\u96c6\u7fa4\uff08Cluster\uff09\u4e00\u7ec4\u62e5\u6709\u5171\u540c\u7684 cluster name \u7684\u8282\u70b9\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">\u8282\u70b9\uff08Node) \u96c6\u7fa4\u4e2d\u7684\u4e00\u4e2a Elasticearch \u5b9e\u4f8b\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">\u7d22\u5f15\uff08Index) \u76f8\u5f53\u4e8e\u5173\u7cfb\u6570\u636e\u5e93\u4e2d\u7684database\u6982\u5ff5\uff0c\u4e00\u4e2a\u96c6\u7fa4\u4e2d\u53ef\u4ee5\u5305\u542b\u591a\u4e2a\u7d22\u5f15\u3002\u8fd9\u4e2a\u662f\u4e2a\u903b\u8f91\u6982\u5ff5\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">\u4e3b\u5206\u7247\uff08Primary shard\uff09 \u7d22\u5f15\u7684\u5b50\u96c6\uff0c\u7d22\u5f15\u53ef\u4ee5\u5207\u5206\u6210\u591a\u4e2a\u5206\u7247\uff0c\u5206\u5e03\u5230\u4e0d\u540c\u7684\u96c6\u7fa4\u8282\u70b9\u4e0a\u3002\u5206\u7247\u5bf9\u5e94\u7684\u662f Lucene \u4e2d\u7684\u7d22\u5f15\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">\u526f\u672c\u5206\u7247\uff08Replica shard\uff09\u6bcf\u4e2a\u4e3b\u5206\u7247\u53ef\u4ee5\u6709\u4e00\u4e2a\u6216\u8005\u591a\u4e2a\u526f\u672c\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">\u7c7b\u578b\uff08Type\uff09\u76f8\u5f53\u4e8e\u6570\u636e\u5e93\u4e2d\u7684table\u6982\u5ff5\uff0cmapping\u662f\u9488\u5bf9 Type \u7684\u3002\u540c\u4e00\u4e2a\u7d22\u5f15\u91cc\u53ef\u4ee5\u5305\u542b\u591a\u4e2a Type\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">Mapping \u76f8\u5f53\u4e8e\u6570\u636e\u5e93\u4e2d\u7684schema\uff0c\u7528\u6765\u7ea6\u675f\u5b57\u6bb5\u7684\u7c7b\u578b\uff0c\u4e0d\u8fc7 Elasticsearch \u7684 mapping \u53ef\u4ee5\u81ea\u52a8\u6839\u636e\u6570\u636e\u521b\u5efa\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">\u6587\u6863\uff08Document) \u76f8\u5f53\u4e8e\u6570\u636e\u5e93\u4e2d\u7684row\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">\u5b57\u6bb5\uff08Field\uff09\u76f8\u5f53\u4e8e\u6570\u636e\u5e93\u4e2d\u7684column\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">\u5206\u914d\uff08Allocation\uff09 \u5c06\u5206\u7247\u5206\u914d\u7ed9\u67d0\u4e2a\u8282\u70b9\u7684\u8fc7\u7a0b\uff0c\u5305\u62ec\u5206\u914d\u4e3b\u5206\u7247\u6216\u8005\u526f\u672c\u3002\u5982\u679c\u662f\u526f\u672c\uff0c\u8fd8\u5305\u542b\u4ece\u4e3b\u5206\u7247\u590d\u5236\u6570\u636e\u7684\u8fc7\u7a0b\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">gateway: \u4ee3\u8868es\u7d22\u5f15\u5feb\u7167\u7684\u5b58\u50a8\u65b9\u5f0f\uff0ces\u9ed8\u8ba4\u662f\u5148\u628a\u7d22\u5f15\u5b58\u653e\u5230\u5185\u5b58\u4e2d\uff0c\u5f53\u5185\u5b58\u6ee1\u4e86\u65f6\u518d\u6301\u4e45\u5316\u5230\u672c\u5730\u786c\u76d8\u3002gateway\u5bf9\u7d22\u5f15\u5feb\u7167\u8fdb\u884c\u5b58\u50a8\uff0c\u5f53\u8fd9\u4e2aes\u96c6\u7fa4\u5173\u95ed\u518d\u91cd\u65b0\u542f\u52a8\u65f6\u5c31\u4f1a\u4ecegateway\u4e2d\u8bfb\u53d6\u7d22\u5f15\u5907\u4efd\u6570\u636e\u3002es\u652f\u6301\u591a\u79cd\u7c7b\u578b\u7684gateway\uff0c\u6709\u672c\u5730\u6587\u4ef6\u7cfb\u7edf\uff08\u9ed8\u8ba4\uff09\uff0c\u5206\u5e03\u5f0f\u6587\u4ef6\u7cfb\u7edf\uff0cHadoop\u7684HDFS\u548camazon\u7684s3\u4e91\u5b58\u50a8\u670d\u52a1\u3002<\/p>\n<section style=\"text-indent: 0em; line-height: 1.5em;\"><\/section>\n<\/li>\n<\/ul>\n<section style=\"text-align: left; text-indent: 0em; font-size: 16px; line-height: 1.5em;\"><strong><span style=\"font-size: 20px;\">ES\u7684\u7d22\u5f15\u6570\u636e\u7ed3\u6784<\/span><\/strong><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">\u4f20\u7edf\u6570\u636e\u5e93\u4e3a\u7279\u5b9a\u5217\u589e\u52a0\u4e00\u4e2a\u7d22\u5f15\uff0c\u4f8b\u5982B-Tree\u7d22\u5f15\u6765\u52a0\u901f\u68c0\u7d22\u3002Elasticsearch\u548cLucene\u4f7f\u7528\u5012\u6392\u7d22\u5f15(inverted index)\u6765\u8fbe\u5230\u76f8\u540c\u76ee\u7684\uff0c\u5012\u6392\u7d22\u5f15\u4e2d\u7528\u5230\u7684\u6570\u636e\u7ed3\u6784\u662fFST\u6811<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-align: left; text-indent: 0em; font-size: 16px; line-height: 1.5em;\"><strong><span style=\"font-size: 20px;\">ES\u4f18\u70b9<\/span><\/strong><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\"><span style=\"font-size: 16px; text-indent: 32px;\">Elasticsearch<\/span>\u4e3b\u8981\u4f18\u52bf\u662f\uff1a\u901f\u5ea6\u5feb\uff0c\u4f7f\u7528\u65b9\u4fbf\uff0c\u5206\u5e03\u5f0f\u7684\uff0c\u68c0\u7d22\uff0c\u529f\u80fd\u5f3a\u5927\u3002<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">ES\u5b98\u65b9\u7684\u60f3\u505a\u7684\u662fELK\u7ed3\u5408\u8d77\u6765\u505a\u65e5\u5fd7\u5206\u6790\u7b49\u5de5\u4f5c\u3002\u4f30\u8ba1\u8fd9\u4e5f\u662f\u5b83\u6700\u591a\u7684\u5e94\u7528\u573a\u666f\u3002<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">Elasticsearch \u73b0\u5728\u7684\u4e3b\u8981\u76ee\u6807\u5e02\u573a\u5df2\u7ecf\u4ece\u7ad9\u5185\u641c\u7d22\u8f6c\u79fb\u5230\u4e86\u76d1\u63a7\u4e0e\u65e5\u5fd7\u6570\u636e\u7684\u6536\u96c6\u5b58\u50a8\u548c\u5206\u6790\uff0c\u4e5f\u5c31\u662f\u5927\u5bb6\u5e38\u8c08\u8bba\u7684ELK\u3002<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">Elasticsearch \u73b0\u5728\u4e3b\u8981\u7684\u5e94\u7528\u573a\u666f\u6709\u4e09\u5757\u3002\u7ad9\u5185\u641c\u7d22\uff0c\u4e3b\u8981\u548c Solr \u7ade\u4e89\uff0c\u5c5e\u4e8e\u540e\u8d77\u4e4b\u79c0\u3002NoSQL json\u6587\u6863\u6570\u636e\u5e93\uff0c\u4e3b\u8981\u62a2\u5360 Mongo \u7684\u5e02\u573a\uff0c\u5b83\u5728\u8bfb\u5199\u6027\u80fd\u4e0a\u4f18\u4e8e Mongo\uff0c\u540c\u65f6\u4e5f\u652f\u6301\u5730\u7406\u4f4d\u7f6e\u67e5\u8be2\uff0c\u8fd8\u65b9\u4fbf\u5730\u7406\u4f4d\u7f6e\u548c\u6587\u672c\u6df7\u5408\u67e5\u8be2\uff0c\u5c5e\u4e8e\u6b6a\u6253\u6b63\u7740\u3002\u76d1\u63a7\uff0c\u7edf\u8ba1\u4ee5\u53ca\u65e5\u5fd7\u7c7b\u65f6\u95f4\u5e8f\u7684\u6570\u636e\u7684\u5b58\u50a8\u548c\u5206\u6790\u4ee5\u53ca\u53ef\u89c6\u5316\uff0c\u8fd9\u65b9\u9762\u662f\u5f15\u9886\u8005\u3002<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-align: left; text-indent: 0em; font-size: 16px; line-height: 1.5em;\"><strong><span style=\"font-size: 20px;\">ES\u67b6\u6784<\/span><\/strong><\/section>\n<section style=\"line-height: 1.5em;\"><img decoding=\"async\" style=\"width: auto;\" title=\"Elasticsearch\u539f\u7406\u5256\u6790\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/05\/0-1589653665-1.png\" alt=\"Elasticsearch\u539f\u7406\u5256\u6790\" \/><\/section>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>\n<section style=\"line-height: 1.5em;\">Gateway\u662fES\u7528\u6765\u5b58\u50a8\u7d22\u5f15\u7684\u6587\u4ef6\u7cfb\u7edf\uff0c\u652f\u6301\u591a\u79cd\u7c7b\u578b\u3002<\/section>\n<\/li>\n<li>\n<section style=\"line-height: 1.5em;\">Gateway\u7684\u4e0a\u5c42\u662f\u4e00\u4e2a\u5206\u5e03\u5f0f\u7684lucene\u6846\u67b6\u3002<\/section>\n<\/li>\n<li>\n<section style=\"line-height: 1.5em;\">Lucene\u4e4b\u4e0a\u662fES\u7684\u6a21\u5757\uff0c\u5305\u62ec\uff1a<\/section>\n<section style=\"line-height: 1.5em;\">\u7d22\u5f15\u6a21\u5757\u3001\u641c\u7d22\u6a21\u5757\u3001\u6620\u5c04\u89e3\u6790\u6a21\u5757\u7b49<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<\/li>\n<li>\n<section style=\"line-height: 1.5em;\">ES\u6a21\u5757\u4e4b\u4e0a\u662f Discovery\u3001Scripting\u548c\u7b2c\u4e09\u65b9\u63d2\u4ef6\u3002<\/section>\n<section style=\"line-height: 1.5em;\">Discovery\u662fES\u7684\u8282\u70b9\u53d1\u73b0\u6a21\u5757\uff0c\u4e0d\u540c\u673a\u5668\u4e0a\u7684ES\u8282\u70b9\u8981\u7ec4\u6210\u96c6\u7fa4\u9700\u8981\u8fdb\u884c\u6d88\u606f\u901a\u4fe1\uff0c\u96c6\u7fa4\u5185\u90e8\u9700\u8981\u9009\u4e3emaster\u8282\u70b9\uff0c\u8fd9\u4e9b\u5de5\u4f5c\u90fd\u662f\u7531Discovery\u6a21\u5757\u5b8c\u6210\u3002<\/section>\n<section style=\"line-height: 1.5em;\">\u652f\u6301\u591a\u79cd\u53d1\u73b0\u673a\u5236\uff0c\u5982 Zen \u3001EC2\u3001gce\u3001Azure\u3002<\/section>\n<section style=\"line-height: 1.5em;\">Scripting\u7528\u6765\u652f\u6301\u5728\u67e5\u8be2\u8bed\u53e5\u4e2d\u63d2\u5165javascript\u3001python\u7b49\u811a\u672c\u8bed\u8a00\uff0cscripting\u6a21\u5757\u8d1f\u8d23\u89e3\u6790\u8fd9\u4e9b\u811a\u672c\uff0c\u4f7f\u7528\u811a\u672c\u8bed\u53e5\u6027\u80fd\u7a0d\u4f4e\u3002<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<\/li>\n<li>\n<section style=\"line-height: 1.5em;\">ES\u4e5f\u652f\u6301\u591a\u79cd\u7b2c\u4e09\u65b9\u63d2\u4ef6\u3002<\/section>\n<\/li>\n<li>\n<section style=\"line-height: 1.5em;\">\u518d\u4e0a\u5c42\u662fES\u7684\u4f20\u8f93\u6a21\u5757\u548cJMX.\u4f20\u8f93\u6a21\u5757\u652f\u6301\u591a\u79cd\u4f20\u8f93\u534f\u8bae\uff0c\u5982 Thrift\u3001memecached\u3001http\uff0c\u9ed8\u8ba4\u4f7f\u7528http\u3002<\/section>\n<section style=\"line-height: 1.5em;\">JMX\u662fjava\u7684\u7ba1\u7406\u6846\u67b6\uff0c\u7528\u6765\u7ba1\u7406ES\u5e94\u7528\u3002<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<\/li>\n<li>\n<section style=\"line-height: 1.5em;\">\u6700\u4e0a\u5c42\u662fES\u63d0\u4f9b\u7ed9\u7528\u6237\u7684\u63a5\u53e3\uff0c\u53ef\u4ee5\u901a\u8fc7RESTful\u63a5\u53e3\u6216java api\u548cES\u96c6\u7fa4\u8fdb\u884c\u4ea4\u4e92\u3002<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<\/li>\n<\/ul>\n<section style=\"text-indent: 0em; line-height: 1.5em;\"><\/section>\n<section style=\"text-align: left; text-indent: 0em; font-size: 16px; line-height: 1.5em;\"><strong><span style=\"font-size: 20px;\">\u670d\u52a1\u53d1\u73b0\u4ee5\u53ca\u9009\u4e3b ZenDiscovery<\/span><\/strong><\/section>\n<ol class=\"list-paddingleft-2\" style=\"list-style-type: decimal;\">\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">\u8282\u70b9\u542f\u52a8\u540e\u5148ping\uff08\u8fd9\u91cc\u7684ping\u662f Elasticsearch \u7684\u4e00\u4e2aRPC\u547d\u4ee4\u3002\u5982\u679c discovery.zen.ping.unicast.hosts \u6709\u8bbe\u7f6e\uff0c\u5219ping\u8bbe\u7f6e\u4e2d\u7684host\uff0c\u5426\u5219\u5c1d\u8bd5ping localhost \u7684\u51e0\u4e2a\u7aef\u53e3\uff0c Elasticsearch \u652f\u6301\u540c\u4e00\u4e2a\u4e3b\u673a\u542f\u52a8\u591a\u4e2a\u8282\u70b9\uff09Ping\u7684response\u4f1a\u5305\u542b\u8be5\u8282\u70b9\u7684\u57fa\u672c\u4fe1\u606f\u4ee5\u53ca\u8be5\u8282\u70b9\u8ba4\u4e3a\u7684master\u8282\u70b9\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">\u9009\u4e3e\u5f00\u59cb\uff0c\u5148\u4ece\u5404\u8282\u70b9\u8ba4\u4e3a\u7684master\u4e2d\u9009\uff0c\u89c4\u5219\u5f88\u7b80\u5355\uff0c\u6309\u7167id\u7684\u5b57\u5178\u5e8f\u6392\u5e8f\uff0c\u53d6\u7b2c\u4e00\u4e2a\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">\u5982\u679c\u5404\u8282\u70b9\u90fd\u6ca1\u6709\u8ba4\u4e3a\u7684master\uff0c\u5219\u4ece\u6240\u6709\u8282\u70b9\u4e2d\u9009\u62e9\uff0c\u89c4\u5219\u540c\u4e0a\u3002\u8fd9\u91cc\u6709\u4e2a\u9650\u5236\u6761\u4ef6\u5c31\u662f discovery.zen.minimum_master_nodes\uff0c\u5982\u679c\u8282\u70b9\u6570\u8fbe\u4e0d\u5230\u6700\u5c0f\u503c\u7684\u9650\u5236\uff0c\u5219\u5faa\u73af\u4e0a\u8ff0\u8fc7\u7a0b\uff0c\u76f4\u5230\u8282\u70b9\u6570\u8db3\u591f\u53ef\u4ee5\u5f00\u59cb\u9009\u4e3e\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">\u6700\u540e\u9009\u4e3e\u7ed3\u679c\u662f\u80af\u5b9a\u80fd\u9009\u4e3e\u51fa\u4e00\u4e2amaster\uff0c\u5982\u679c\u53ea\u6709\u4e00\u4e2alocal\u8282\u70b9\u90a3\u5c31\u9009\u51fa\u7684\u662f\u81ea\u5df1\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">\u5982\u679c\u5f53\u524d\u8282\u70b9\u662fmaster\uff0c\u5219\u5f00\u59cb\u7b49\u5f85\u8282\u70b9\u6570\u8fbe\u5230 minimum_master_nodes\uff08\u6700\u5c0f\u5019\u9009\u8282\u70b9\u6570\uff09\uff0c\u7136\u540e\u63d0\u4f9b\u670d\u52a1\u3002<\/p>\n<\/li>\n<li>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">\u5982\u679c\u5f53\u524d\u8282\u70b9\u4e0d\u662fmaster\uff0c\u5219\u5c1d\u8bd5\u52a0\u5165master\u3002<\/p>\n<\/li>\n<\/ol>\n<p style=\"line-height: 1.75em;\">\n<p style=\"text-indent: 2em; line-height: 1.75em;\">Elasticsearch \u5c06\u4ee5\u4e0a\u670d\u52a1\u53d1\u73b0\u4ee5\u53ca\u9009\u4e3b\u7684\u6d41\u7a0b\u53eb\u505a ZenDiscovery \u3002\u7531\u4e8e\u5b83\u652f\u6301\u4efb\u610f\u6570\u76ee\u7684\u96c6\u7fa4\uff081-N\uff09,\u6240\u4ee5\u4e0d\u80fd\u50cf Zookeeper\/Etcd\u90a3\u6837\u9650\u5236\u8282\u70b9\u5fc5\u987b\u662f\u5947\u6570\uff0c\u4e5f\u5c31\u65e0\u6cd5\u7528\u6295\u7968\u7684\u673a\u5236\u6765\u9009\u4e3b\uff0c\u800c\u662f\u901a\u8fc7\u4e00\u4e2a\u89c4\u5219\uff0c\u53ea\u8981\u6240\u6709\u7684\u8282\u70b9\u90fd\u9075\u5faa\u540c\u6837\u7684\u89c4\u5219\uff0c\u5f97\u5230\u7684\u4fe1\u606f\u90fd\u662f\u5bf9\u7b49\u7684\uff0c\u9009\u51fa\u6765\u7684\u4e3b\u8282\u70b9\u80af\u5b9a\u662f\u4e00\u81f4\u7684\u3002\u4f46\u5206\u5e03\u5f0f\u7cfb\u7edf\u7684\u95ee\u9898\u5c31\u51fa\u5728\u4fe1\u606f\u4e0d\u5bf9\u7b49\u7684\u60c5\u51b5\uff0c\u8fd9\u65f6\u5019\u5f88\u5bb9\u6613\u51fa\u73b0\u8111\u88c2\uff08Split-Brain\uff09\u7684\u95ee\u9898\uff0c\u5927\u591a\u6570\u89e3\u51b3\u65b9\u6848\u5c31\u662f\u8bbe\u7f6e\u4e00\u4e2aquorum\u503c\uff0c\u8981\u6c42\u53ef\u7528\u8282\u70b9\u5fc5\u987b\u5927\u4e8equorum\uff08\u4e00\u822c\u662f\u8d85\u8fc7\u534a\u6570\u8282\u70b9\uff09\uff0c\u624d\u80fd\u5bf9\u5916\u63d0\u4f9b\u670d\u52a1\u3002\u800c Elasticsearch \u4e2d\uff0c\u8fd9\u4e2aquorum\u7684\u914d\u7f6e\u5c31\u662f discovery.zen.minimum_master_nodes \u3002<\/p>\n<p style=\"line-height: 1.75em;\">\n<p style=\"line-height: 1.75em;\">\n<p style=\"text-align: left; text-indent: 0em; font-size: 16px; line-height: 1.75em;\"><strong><span style=\"font-size: 20px;\">ES\u662f\u5982\u4f55\u5b9e\u73b0Master\u9009\u4e3e\u7684<\/span><\/strong><\/p>\n<p style=\"text-indent: 0em; line-height: 1.75em;\">\n<p style=\"text-indent: 2em; line-height: 1.75em;\">Elasticsearch\u7684\u9009\u4e3e\u662fZenDiscovery\u6a21\u5757\u8d1f\u8d23\u7684\uff0c\u901a\u8fc7\u591a\u64ad\u6216\u5355\u64ad\u6280\u672f\u6765\u53d1\u73b0\u540c\u4e00\u4e2a\u96c6\u7fa4\u4e2d\u7684\u5176\u4ed6\u8282\u70b9\u5e76\u4e0e\u5b83\u4eec\u8fde\u63a5\u3002<\/p>\n<p style=\"text-indent: 2em; line-height: 1.75em;\">\u4e00\u4e2a\u8282\u70b9\u5982\u4f55\u9009\u53d6\u5b83\u81ea\u5df1\u8ba4\u4e3a\u7684master\u8282\u70b9\uff1f<\/p>\n<p style=\"text-indent: 2em; line-height: 1.75em;\">\u5b83\u4f1a\u5bf9\u6240\u6709\u53ef\u4ee5\u6210\u4e3amaster\u7684\u8282\u70b9\uff08node.master: true\uff09\u6839\u636enodeId\u5b57\u5178\u6392\u5e8f\uff0c\uff0c\u7136\u540e\u9009\u51fa\u7b2c\u4e00\u4e2a\uff08\u7b2c0\u4f4d\uff09\u8282\u70b9\uff0c\u6682\u4e14\u8ba4\u4e3a\u5b83\u662fmaster\u8282\u70b9\u3002<\/p>\n<p style=\"text-indent: 2em; line-height: 1.75em;\">\u5982\u679c\u5bf9\u67d0\u4e2a\u8282\u70b9\u7684\u6295\u7968\u6570\u8fbe\u5230\u4e00\u5b9a\u7684\u503c\uff08\u53ef\u4ee5\u6210\u4e3amaster\u8282\u70b9\u6570n\/2+1\uff09\u5e76\u4e14\u8be5\u8282\u70b9\u81ea\u5df1\u4e5f\u9009\u4e3e\u81ea\u5df1\uff0c\u90a3\u8fd9\u4e2a\u8282\u70b9\u5c31\u662fmaster\u3002\u5426\u5219\u91cd\u65b0\u9009\u4e3e\u4e00\u76f4\u5230\u6ee1\u8db3\u4e0a\u8ff0\u6761\u4ef6\u3002<\/p>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-align: left; text-indent: 0em; font-size: 16px; line-height: 1.5em;\"><strong><span style=\"font-size: 20px;\">\u591a\u64ad\u548c\u5355\u64ad<\/span><\/strong><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<p style=\"text-indent: 2em; line-height: 1.75em;\">\u57fa\u4e8e\u4ee5\u4e0b\u5047\u8bbe\uff1a\u96c6\u7fa4\u7531cluster.name\u8bbe\u7f6e\u9879\u76f8\u540c\u7684\u8282\u70b9\u81ea\u52a8\u8fde\u63a5\u800c\u6210,\u540c\u4e00\u4e2a\u7f51\u6bb5\u4e2d\u5b58\u5728\u591a\u4e2a\u72ec\u7acb\u7684\u96c6\u7fa4.Zen \u53d1\u73b0\u673a\u5236\u662fElasticSearch\u4e2d\u9ed8\u8ba4\u7684\u7528\u6765\u53d1\u73b0\u65b0\u8282\u70b9\u7684\u529f\u80fd\u6a21\u5757,\u800c\u4e14\u96c6\u7fa4\u542f\u52a8\u540e\u9ed8\u8ba4\u751f\u6548\u3002Zen\u53d1\u73b0\u673a\u5236\u9ed8\u8ba4\u914d\u7f6e\u662f\u7528\u591a\u64ad\u6765\u5bfb\u627e\u5176\u5b83\u7684\u8282\u70b9\u3002\u5982\u679c\u5404\u4e2a\u6a21\u5757\u5de5\u4f5c\u6b63\u5e38\uff0c\u8be5\u8282\u70b9\u5c31\u4f1a\u81ea\u52a8\u6dfb\u52a0\u5230\u4e0e\u8282\u70b9\u4e2d\u96c6\u7fa4\u540d\u5b57(cluster.name)\u4e00\u6837\u7684\u96c6\u7fa4\uff0c\u540c\u65f6\u5176\u5b83\u7684\u8282\u70b9\u90fd\u80fd\u611f\u77e5\u5230\u65b0\u8282\u70b9\u7684\u52a0\u5165\u3002\u5728\u6bd4\u8f83\u5927\u7684\u96c6\u7fa4\u4e2d\uff0c\u591a\u64ad\u53d1\u73b0\u673a\u5236\u53ef\u80fd\u4f1a\u4ea7\u751f\u592a\u591a\u4e0d\u5fc5\u8981\u7684\u6d41\u91cf\u5f00\u9500\uff0cZen\u53d1\u73b0\u673a\u5236\u5f15\u5165\u4e86\u7b2c\u4e8c\u79cd\u53d1\u73b0\u8282\u70b9\u7684\u65b9\u6cd5\uff1a\u5355\u64ad\u6a21\u5f0f\u3002\u5173\u4e8e\u540d\u8bcd\u591a\u64ad\u548c\u5355\u64ad\uff08<span style=\"text-indent: 2em;\">\u94fe\u63a5\uff1ahttps:\/\/www.zhihu.com\/question\/29360024\/answ\uff09\uff1a<\/span><\/p>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>\n<p style=\"line-height: 1.75em;\">\u591a\u64ad\uff1a\u5f53\u8282\u70b9\u5e76\u975e\u96c6\u7fa4\u7684\u4e00\u90e8\u5206\u65f6(\u6bd4\u5982\u8282\u70b9\u53ea\u662f\u521a\u521a\u542f\u52a8\u6216\u8005\u91cd\u542f )\uff0c\u5b83\u4f1a\u53d1\u9001\u4e00\u4e2a\u591a\u64ad\u7684ping\u8bf7\u6c42\u5230\u7f51\u6bb5\u4e2d\uff0c\u8be5\u8bf7\u6c42\u53ea\u662f\u7528\u6765\u901a\u77e5\u6240\u6709\u80fd\u8fde\u63a5\u5230\u8282\u70b9\u548c\u96c6\u7fa4\u5b83\u5df2\u7ecf\u51c6\u5907\u597d\u52a0\u5165\u5230\u96c6\u7fa4\u4e2d\u3002<\/p>\n<\/li>\n<li>\n<p style=\"line-height: 1.75em;\">\u5355\u64ad: \u5173\u95ed\u591a\u64ad\uff0c\u5c31\u53ef\u4ee5\u5b89\u5168\u5730\u4f7f\u7528\u5355\u64ad\u3002\u5f53\u8282\u70b9\u4e0d\u662f\u96c6\u7fa4\u7684\u4e00\u90e8\u5206\u65f6(\u6bd4\u5982\u8282\u70b9\u91cd\u542f\uff0c\u542f\u52a8\u6216\u8005\u7531\u4e8e\u67d0\u4e9b\u9519\u8bef\u4ece\u96c6\u7fa4\u4e2d\u65ad\u5f00)\uff0c\u8282\u70b9\u4f1a\u53d1\u9001\u4e00\u4e2aping\u8bf7\u6c42\u5230\u4e8b\u5148\u8bbe\u7f6e\u597d\u7684\u5730\u5740\u4e2d\uff0c\u6765\u901a\u77e5\u96c6\u7fa4\u5b83\u5df2\u7ecf\u51c6\u5907\u597d\u52a0\u5165\u5230\u96c6\u7fa4\u4e2d\u4e86\u3002<\/p>\n<\/li>\n<\/ul>\n<section style=\"text-indent: 2em; line-height: 1.5em;\"><\/section>\n<p style=\"text-indent: 2em; line-height: 1.75em;\">\u4e3a\u4e86\u5b89\u5168\u8003\u8651\uff0c\u963f\u91cc\u4e00\u822c\u7528\u5355\u64ad\u6a21\u5f0f\u3002<\/p>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">ElasticSearch\u8fd0\u884c\u65f6\u4f1a\u542f\u52a8\u4e24\u4e2a\u63a2\u6d4b\u8fdb\u7a0b\u3002\u4e00\u4e2a\u8fdb\u7a0b\u7528\u4e8e\u4ece\u4e3b\u8282\u70b9\u5411\u96c6\u7fa4\u4e2d\u5176\u5b83\u8282\u70b9\u53d1\u9001ping\u8bf7\u6c42\u6765\u68c0\u6d4b\u8282\u70b9\u662f\u5426\u6b63\u5e38\u53ef\u7528\u3002\u53e6\u4e00\u4e2a\u8fdb\u7a0b\u7684\u5de5\u4f5c\u53cd\u8fc7\u6765\u4e86\uff0c\u5176\u5b83\u7684\u8282\u70b9\u5411\u4e3b\u8282\u70b9\u53d1\u9001ping\u8bf7\u6c42\u6765\u9a8c\u8bc1\u4e3b\u8282\u70b9\u662f\u5426\u6b63\u5e38\u4e14\u5fe0\u4e8e\u804c\u5b88<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-align: left; text-indent: 0em; font-size: 16px; line-height: 1.5em;\"><strong><span style=\"font-size: 20px;\">ES\u662f\u5982\u4f55\u907f\u514d\u8111\u88c2\u73b0\u8c61\u7684<\/span><\/strong><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">\u53ef\u4ee5\u901a\u8fc7discovery.zen.minimum_master_nodes<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">\u8fd9\u4e2a\u53c2\u6570\u7684\u8bbe\u7f6e\u6765\u907f\u514d\u8111\u88c2\uff0c\u8bbe\u7f6e\u4e3a(N\/2)+1\u3002<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-align: left; text-indent: 0em; font-size: 16px; line-height: 1.5em;\"><strong><span style=\"font-size: 20px;\">ES\u7684\u96c6\u7fa4\u53ea\u6709\u4e00\u4e2a\u8282\u70b9\u7684\u8bdd\u53ef\u4ee5\u6709\u526f\u672c\u5417\uff1f<\/span><\/strong><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">Elasticsearch \u7981\u6b62\u540c\u4e00\u4e2a\u5206\u7247\u7684\u4e3b\u5206\u7247\u548c\u526f\u672c\u5206\u7247\u5728\u540c\u4e00\u4e2a\u8282\u70b9\u4e0a\uff0c\u6240\u4ee5\u5982\u679c\u662f\u4e00\u4e2a\u8282\u70b9\u7684\u96c6\u7fa4\u662f\u4e0d\u80fd\u6709\u526f\u672c\u7684\u3002<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-align: left; text-indent: 0em; font-size: 16px; line-height: 1.5em;\"><strong><span style=\"font-size: 20px;\">\u96c6\u7fa4\u5982\u4f55\u6062\u590d\u4ee5\u53ca\u5bb9\u707e<\/span><\/strong><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<p style=\"text-indent: 2em; line-height: 1.75em;\">\u5206\u5e03\u5f0f\u7cfb\u7edf\u7684\u4e00\u4e2a\u8981\u6c42\u5c31\u662f\u8981\u4fdd\u8bc1\u9ad8\u53ef\u7528\u3002\u5982\u679c\u662f\u6545\u969c\u5bfc\u81f4\u8282\u70b9\u6302\u6389\uff0cElasticsearch \u5c31\u4f1a\u4e3b\u52a8allocation\u3002\u4f46\u5982\u679c\u8282\u70b9\u4e22\u5931\u540e\u7acb\u523ballocation\uff0c\u7a0d\u540e\u8282\u70b9\u6062\u590d\u53c8\u7acb\u523b\u52a0\u5165\uff0c\u4f1a\u9020\u6210\u6d6a\u8d39\u3002Elasticsearch\u7684\u6062\u590d\u6d41\u7a0b\u5927\u81f4\u5982\u4e0b\uff1a<\/p>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>\n<section style=\"line-height: 1.75em;\">\u96c6\u7fa4\u4e2d\u7684\u67d0\u4e2a\u975emaster\u8282\u70b9\u4e22\u5931\u7f51\u7edc\u8fde\u63a5<\/section>\n<\/li>\n<li>\n<section style=\"line-height: 1.75em;\">\u5982\u679c\u8be5\u8282\u70b9\u4e0a\u7684\u5206\u7247\u6709\u526f\u672c\uff0c\u90a3\u4e48master\u63d0\u5347\u8be5\u8282\u70b9\u4e0a\u7684\u6240\u6709\u4e3b\u5206\u7247\u7684\u5728\u5176\u4ed6\u8282\u70b9\u4e0a\u7684\u526f\u672c\u4e3a\u4e3b\u5206\u7247\u3002<\/section>\n<section style=\"line-height: 1.75em;\">cluster\u96c6\u7fa4\u72b6\u6001\u53d8\u4e3a yellow ,\u56e0\u4e3a\u526f\u672c\u6570\u4e0d\u591f\u7b49\u5f85\u4e00\u4e2a\u8d85\u65f6\u8bbe\u7f6e\u7684\u65f6\u95f4\uff0c\u5982\u679c\u4e22\u5931\u8282\u70b9\u56de\u6765\u5c31\u53ef\u4ee5\u7acb\u5373\u6062\u590d\uff08\u9ed8\u8ba4\u4e3a1\u5206\u949f\uff0c\u901a\u8fc7 index.unassigned.node_left.delayed_timeout \u8bbe\u7f6e\uff09\u3002<\/section>\n<section style=\"line-height: 1.75em;\"><span style=\"text-indent: 2em;\">\u5982\u679c\u8be5\u5206\u7247\u5df2\u7ecf\u6709\u5199\u5165\uff0c\u5219\u901a\u8fc7translog\u8fdb\u884c\u589e\u91cf\u540c\u6b65\u6570\u636e\u3002<\/span><\/section>\n<\/li>\n<\/ul>\n<section style=\"text-indent: 2em; line-height: 1.75em;\">\u5426\u5219\u5c06\u526f\u672c\u5206\u914d\u7ed9\u5176\u4ed6\u8282\u70b9\uff0c\u5f00\u59cb\u540c\u6b65\u6570\u636e\u3002<\/section>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>\n<section style=\"line-height: 1.75em;\">\u4f46\u5982\u679c\u8be5\u8282\u70b9\u4e0a\u7684\u5206\u7247\u6ca1\u6709\u526f\u672c\uff0c\u5219\u65e0\u6cd5\u6062\u590d\uff0c\u96c6\u7fa4\u72b6\u6001\u4f1a\u53d8\u4e3ared\uff0c\u8868\u793a\u53ef\u80fd\u8981\u4e22\u5931\u8be5\u5206\u7247\u7684\u6570\u636e\u4e86\u3002<\/section>\n<section style=\"line-height: 1.75em;\"><\/section>\n<\/li>\n<\/ul>\n<section style=\"text-indent: 2em; line-height: 1.75em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.75em;\">\u5982\u679c\u662f\u4e3b\u8282\u70b9master\u6302\u6389\u600e\u4e48\u529e\u5462\uff1f\u5f53\u4ece\u8282\u70b9\u4eec\u53d1\u73b0\u548c\u4e3b\u8282\u70b9\u8fde\u63a5\u4e0d\u4e0a\u4e86\uff0c\u90a3\u4e48\u4ed6\u4eec\u4f1a\u81ea\u5df1\u51b3\u5b9a\u518d\u9009\u4e3e\u51fa\u4e00\u4e2a\u8282\u70b9\u4e3a\u4e3b\u8282\u70b9\u3002\u4f46\u662f\u8fd9\u91cc\u6709\u4e2a\u8111\u88c2\u7684\u95ee\u9898\uff0c\u5047\u8bbe\u67095\u53f0\u673a\u5668\uff0c3\u53f0\u5728\u4e00\u4e2a\u673a\u623f\uff0c2\u53f0\u5728\u53e6\u4e00\u4e2a\u673a\u623f\uff0c\u5f53\u4e24\u4e2a\u673a\u623f\u4e4b\u95f4\u7684\u8054\u7cfb\u65ad\u4e86\u4e4b\u540e\uff0c\u6bcf\u4e2a\u673a\u623f\u7684\u8282\u70b9\u4f1a\u81ea\u5df1\u805a\u4f1a\uff0c\u63a8\u4e3e\u51fa\u4e00\u4e2a\u4e3b\u8282\u70b9\u3002<\/section>\n<section style=\"text-indent: 2em; line-height: 1.75em;\">\u8fd9\u4e2a\u65f6\u5019\u5c31\u6709\u4e24\u4e2a\u4e3b\u8282\u70b9\u5b58\u5728\u4e86\uff0c\u5f53\u673a\u623f\u4e4b\u95f4\u7684\u8054\u7cfb\u6062\u590d\u4e86\u4e4b\u540e\uff0c\u8fd9\u4e2a\u65f6\u5019\u5c31\u4f1a\u51fa\u73b0\u6570\u636e\u51b2\u7a81\u4e86\u3002\u89e3\u51b3\u7684\u529e\u6cd5\u5c31\u662f\u8bbe\u7f6e\u53c2\u6570: discovery.zen.minimum_master_nodes<span style=\"text-indent: 2em;\">\u4e3a3(\u8d85\u8fc7\u4e00\u534a\u7684\u8282\u70b9\u6570)\uff0c\u90a3\u4e48\u5f53\u4e24\u4e2a\u673a\u623f\u7684\u8fde\u63a5\u65ad\u4e86\u4e4b\u540e\uff0c\u5c31\u4f1a\u4ee5\u5927\u4e8e\u7b49\u4e8e3\u7684\u673a\u623f\u7684master\u4e3a\u4e3b\uff0c\u53e6\u5916\u4e00\u4e2a\u673a\u623f\u7684\u8282\u70b9\u5c31\u505c\u6b62\u670d\u52a1\u4e86\u3002<\/span><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-align: left; text-indent: 0em; font-size: 16px; line-height: 1.5em;\"><strong><span style=\"font-size: 20px;\">es\u641c\u7d22\u7684\u8fc7\u7a0b\u63cf\u8ff0(\u9ed8\u8ba4\u641c\u7d22\u65b9\u5f0fQuery Then Fetch)<\/span><\/strong><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\"><em>Query Then Fetch\uff1a<\/em><span style=\"text-indent: 2em;\">\u5982\u679c\u4f60\u641c\u7d22\u65f6\uff0c\u6ca1\u6709\u6307\u5b9a\u641c\u7d22\u65b9\u5f0f\uff0c\u5c31\u662f\u4f7f\u7528\u7684\u8fd9\u79cd\u641c\u7d22\u65b9\u5f0f\u3002\u8fd9\u79cd\u641c\u7d22\u65b9\u5f0f\uff0c\u5927\u6982\u5206\u4e24\u4e2a\u6b65\u9aa4\uff0c\u7b2c\u4e00\u6b65\uff0c\u5148\u5411\u6240\u6709\u7684shard\u53d1\u51fa\u8bf7\u6c42\uff0c\u5404\u5206\u7247\u53ea\u8fd4\u56de\u6392\u5e8f\u548c\u6392\u540d\u76f8\u5173\u7684\u4fe1\u606f\uff08\u6ce8\u610f\uff0c\u4e0d\u5305\u62ec\u6587\u6863document)\uff0c\u7136\u540e\u6309\u7167\u5404\u5206\u7247\u8fd4\u56de\u7684\u5206\u6570\u8fdb\u884c\u91cd\u65b0\u6392\u5e8f\u548c\u6392\u540d\uff0c\u53d6\u524dsize\u4e2a\u6587\u6863\u3002\u7136\u540e\u8fdb\u884c\u7b2c\u4e8c\u6b65\uff0c\u53bb\u76f8\u5173\u7684shard\u53d6document\u3002\u8fd9\u79cd\u65b9\u5f0f\u8fd4\u56de\u7684document\u4e0e\u7528\u6237\u8981\u6c42\u7684size\u662f\u76f8\u7b49\u7684\u3002<\/span><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">\u641c\u7d22\u88ab\u6267\u884c\u6210\u4e00\u4e2a\u4e24\u9636\u6bb5\u8fc7\u7a0b\uff0c\u6211\u4eec\u79f0\u4e4b\u4e3a Query Then Fetch<\/section>\n<section style=\"line-height: 1.5em;\"><span style=\"text-indent: 2em;\">\u00a0 \u00a0 \u00a0 \u00a0\u5728\u521d\u59cb\u67e5\u8be2\u9636\u6bb5\u65f6\uff0c\u67e5\u8be2\u4f1a\u5e7f\u64ad\u5230\u7d22\u5f15\u4e2d\u6bcf\u4e00\u4e2a\u5206\u7247\u62f7\u8d1d\uff08\u4e3b\u5206\u7247\u6216\u8005\u526f\u672c\u5206\u7247\uff09\u3002\u6bcf\u4e2a\u5206\u7247\u5728\u672c\u5730\u6267\u884c\u641c\u7d22\u5e76\u6784\u5efa\u4e00\u4e2a\u5339\u914d\u6587\u6863\u7684\u5927\u5c0f\u4e3a from + size \u7684\u4f18\u5148\u961f\u5217\u3002PS\uff1a\u5728\u641c\u7d22\u7684\u65f6\u5019\u662f\u4f1a\u67e5\u8be2Filesystem Cache\u7684\uff0c\u4f46\u662f\u6709\u90e8\u5206\u6570\u636e\u8fd8\u5728Memory Buffer\uff0c\u6240\u4ee5\u641c\u7d22\u662f\u8fd1\u5b9e\u65f6\u7684\u3002<\/span><\/section>\n<p style=\"line-height: 1.5em; text-indent: 2em;\"><span style=\"text-indent: 2em;\">\u6bcf\u4e2a\u5206\u7247\u8fd4\u56de\u5404\u81ea\u4f18\u5148\u961f\u5217\u4e2d \u6240\u6709\u6587\u6863\u7684 ID \u548c\u6392\u5e8f\u503c \u7ed9\u534f\u8c03\u8282\u70b9\uff0c\u5b83\u5408\u5e76\u8fd9\u4e9b\u503c\u5230\u81ea\u5df1\u7684\u4f18\u5148\u961f\u5217\u4e2d\u6765\u4ea7\u751f\u4e00\u4e2a\u5168\u5c40\u6392\u5e8f\u540e\u7684\u7ed3\u679c\u5217\u8868\u3002<\/span><\/p>\n<p style=\"line-height: 1.5em; text-indent: 2em;\"><span style=\"text-indent: 2em;\">\u63a5\u4e0b\u6765\u5c31\u662f \u53d6\u56de\u9636\u6bb5\uff0c\u534f\u8c03\u8282\u70b9\u8fa8\u522b\u51fa\u54ea\u4e9b\u6587\u6863\u9700\u8981\u88ab\u53d6\u56de\u5e76\u5411\u76f8\u5173\u7684\u5206\u7247\u63d0\u4ea4\u591a\u4e2a GET \u8bf7\u6c42\u3002\u6bcf\u4e2a\u5206\u7247\u52a0\u8f7d\u5e76\u4e30\u5bcc\u6587\u6863\uff0c\u5982\u679c\u6709\u9700\u8981\u7684\u8bdd\uff0c\u63a5\u7740\u8fd4\u56de\u6587\u6863\u7ed9\u534f\u8c03\u8282\u70b9\u3002\u4e00\u65e6\u6240\u6709\u7684\u6587\u6863\u90fd\u88ab\u53d6\u56de\u4e86\uff0c\u534f\u8c03\u8282\u70b9\u8fd4\u56de\u7ed3\u679c\u7ed9\u5ba2\u6237\u7aef\u3002<\/span><\/p>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-align: left; text-indent: 0em; font-size: 16px; line-height: 1.5em;\"><strong><span style=\"font-size: 20px;\">ES \u96c6\u7fa4\u5206\u7247\u7684\u8bfb\u5199\u64cd\u4f5c\u6d41\u7a0b<\/span><\/strong><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">1\u3001\u8def\u7531\u8ba1\u7b97(routing)\u548c\u526f\u672c\u4e00\u81f4\u6027\uff08replica\uff09<\/section>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>routing<\/li>\n<\/ul>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">Elasticsearch\u9488\u5bf9\u8def\u7531\u8ba1\u7b97\u9009\u62e9\u4e86\u4e00\u4e2a\u5f88\u7b80\u5355\u7684\u65b9\u6cd5\uff0c\u8ba1\u7b97\u5982\u4e0b\uff1a<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">routing = hash(routing) % number_of_primary_shards<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">\u6bcf\u4e2a\u6570\u636e\u90fd\u6709\u4e00\u4e2arouting\u53c2\u6570\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5c31\u4f7f\u7528\u5176_id\u503c\uff0c\u5c06\u5176_id\u503c\u8ba1\u7b97hash\u540e\uff0c\u5bf9\u7d22\u5f15\u7684\u4e3b\u5206\u7247\u6570\u53d6\u4f59\uff0c\u5c31\u662f\u6570\u636e\u5b9e\u9645\u5e94\u8be5\u5b58\u50a8\u5230\u7684\u5206\u7247ID<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">\u7531\u4e8e\u53d6\u4f59\u8fd9\u4e2a\u8ba1\u7b97\uff0c\u5b8c\u5168\u4f9d\u8d56\u4e8e\u5206\u6bcd\uff0c\u6240\u4ee5\u5bfc\u81f4Elasticsearch\u7d22\u5f15\u6709\u4e00\u4e2a\u9650\u5236\uff0c\u7d22\u5f15\u7684\u4e3b\u5206\u7247\u6570\uff0c\u4e0d\u53ef\u4ee5\u968f\u610f\u4fee\u6539\u3002\u56e0\u4e3a\u4e00\u65e6\u4e3b\u5206\u7247\u6570\u4e0d\u4e00\u6837\uff0c\u7d22\u5f15\u6570\u636e\u4e0d\u53ef\u8bfb\u3002<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>\u526f\u672c\u4e00\u81f4\u6027(replica)<\/li>\n<\/ul>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">\u4f5c\u4e3a\u5206\u5e03\u5f0f\u7cfb\u7edf\uff0c\u6570\u636e\u526f\u672c\u53ef\u7b97\u662f\u4e00\u4e2a\u6807\u914d\u3002Elasticsearch\u6570\u636e\u5199\u5165\u6d41\u7a0b\u3002\u81ea\u7136\u6d89\u53ca\u526f\u672c\uff0c\u5728\u6709\u526f\u672c\u914d\u7f6e\u7684\u60c5\u51b5\u4e0b\uff0c\u6570\u636e\u4ece\u53d1\u5411Elasticsearch\u8282\u70b9\uff0c\u5230\u63a5\u5230Elasticsearch\u8282\u70b9\u54cd\u5e94\u8fd4\u56de\uff0c\u6d41\u5411\u5982\u4e0b<\/section>\n<section style=\"line-height: 1.5em;\"><img decoding=\"async\" style=\"width: auto; box-sizing: border-box; outline: none; margin-top: 24px; margin-bottom: 24px; overflow-wrap: break-word; cursor: zoom-in; color: #4d4d4d; font-size: 16px; font-variant-ligatures: common-ligatures; background-color: #ffffff; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; border: 0px none initial;\" title=\"Elasticsearch\u539f\u7406\u5256\u6790\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/05\/0-1589653665-2.png\" alt=\"Elasticsearch\u539f\u7406\u5256\u6790\" \/><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">1\uff09\u5ba2\u6237\u7aef\u8bf7\u6c42\u53d1\u9001\u7ed9master Node1\u8282\u70b9\uff0c\u8fd9\u91cc\u4e5f\u53ef\u4ee5\u53d1\u9001\u7ed9\u5176\u4ed6\u8282\u70b9<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">2\uff09Node1\u8282\u70b9\u7528\u6570\u636e\u7684_id\u8ba1\u7b97\u51fa\u6570\u636e\u5e94\u8be5\u5b58\u50a8\u5728shard0\u4e0a\uff0c\u901a\u8fc7cluster state\u4fe1\u606f\u53d1\u73b0shard0\u7684\u4e3b\u5206\u7247\u5728Node3\u8282\u70b9\u4e0a\uff0cNode1\u8f6c\u53d1\u8bf7\u6c42\u6570\u636e\u7ed9Node3,Node3\u5b8c\u6210\u6570\u636e\u7684\u7d22\u5f15\uff0c\u7d22\u5f15\u8fc7\u7a0b\u5728\u4e0a\u7bc7\u535a\u5ba2\u4e2d\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u3002<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">3\uff09Node3\u5e76\u884c\u8f6c\u53d1\u6570\u636e\u7ed9\u5206\u914d\u6709shard0\u7684\u526f\u672c\u5206\u7247Node1\u548cNode2\u4e0a\u3002\u5f53\u6536\u5230\u4efb\u4e00\u8282\u70b9\u6c47\u62a5\u526f\u672c\u5206\u7247\u6570\u636e\u5199\u5165\u6210\u529f\u4ee5\u540e\uff0cNode3\u5373\u8fd4\u56de\u7ed9\u521d\u59cb\u7684\u63a5\u53d7\u8282\u70b9Node1\uff0c\u5ba3\u5e03\u6570\u636e\u5199\u5165\u6210\u529f\u3002Node1\u6210\u529f\u8fd4\u56de\u7ed9\u5ba2\u6237\u7aef\u3002<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">2\u3001shard\u7684allocate\u914d\u7f6e<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">\u4e0a\u6587\u4ecb\u7ecd\u4e86\u5206\u7247\u7684\u7d22\u5f15\u8fc7\u7a0b\uff0c\u901a\u8fc7\u8def\u7531\u8ba1\u7b97\u53ef\u4ee5\u786e\u5b9a\u6587\u672c\u6240\u5728\u7684\u5206\u7247id\uff0c\u90a3\u4e48\u5206\u7247\u5728\u96c6\u7fa4\u4e2d\u7684\u5206\u914d\u7b56\u7565\u662f\u5982\u4f55\u786e\u5b9a\u7684\uff1f<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">\u4e00\u822c\u6765\u8bf4\uff0c\u67d0\u4e2ashard\u5206\u914d\u5728\u54ea\u4e2a\u8282\u70b9\u4e0a\uff0c\u662f\u7531Elasticsearch\u81ea\u52a8\u51b3\u5b9a\u7684\u3002\u4ee5\u4e0b\u51e0\u79cd\u60c5\u51b5\u4f1a\u89e6\u53d1\u5206\u914d\u52a8\u4f5c\uff1a<\/section>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li><span style=\"text-indent: 2em;\">\u65b0\u7d22\u5f15\u751f\u6210<\/span><\/li>\n<li><span style=\"text-indent: 2em;\">\u7d22\u5f15\u7684\u5220\u9664<\/span><\/li>\n<li><span style=\"text-indent: 2em;\">\u65b0\u589e\u526f\u672c\u5206\u7247<\/span><\/li>\n<li><span style=\"text-indent: 2em;\">\u8282\u70b9\u589e\u51cf\u5f15\u53d1\u7684\u6570\u636e\u5747\u8861<\/span><\/li>\n<\/ul>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-align: left; text-indent: 0em; font-size: 16px; line-height: 1.5em;\"><strong><span style=\"font-size: 20px;\">ES \u4e2d\u7684shard(\u5206\u7247)<\/span><\/strong><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">Shard \u5b9e\u9645\u4e0a\u662f\u4e00\u4e2a Lucene \u7684\u4e00\u4e2a\u5b9e\u4f8b\uff08Lucene Index\uff09\uff0c\u4f46\u5f80\u5f80\u4e00\u4e2a Elastic Index \u90fd\u662f\u7531\u591a\u4e2a Shards \uff08primary &amp; replica\uff09\u6784\u6210\u7684\u3002<\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">\u7279\u522b\u6ce8\u610f\uff0c\u5728\u5355\u4e2a Lucene \u5b9e\u4f8b\u91cc\u6700\u591a\u5305\u542b2,147,483,519 (= Integer.MAX_VALUE &#8211; 128) \u4e2a Documents\u3002<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-align: left; text-indent: 0em; font-size: 16px; line-height: 1.5em;\"><strong><span style=\"font-size: 20px;\">Lucene Index\u7ed3\u6784<\/span><\/strong><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">\u4e00\u4e2a Lucene Index \u5728\u6587\u4ef6\u7cfb\u7edf\u7684\u8868\u73b0\u4e0a\u6765\u770b\u5c31\u662f\u5b58\u50a8\u4e86\u4e00\u7cfb\u5217\u6587\u4ef6\u7684\u4e00\u4e2a\u76ee\u5f55\u3002\u4e00\u4e2a Lucene Index \u7531\u8bb8\u591a\u72ec\u7acb\u7684 segments \u7ec4\u6210\uff0c\u800c segments \u5305\u542b\u4e86\u6587\u6863\u4e2d\u7684\u8bcd\u6c47\u5b57\u5178\u3001\u8bcd\u6c47\u5b57\u5178\u7684\u5012\u6392\u7d22\u5f15\u4ee5\u53ca Document \u7684\u5b57\u6bb5\u6570\u636e\uff08\u8bbe\u7f6e\u4e3aStored.YES\u7684\u5b57\u6bb5\uff09\uff0c\u6240\u6709\u7684 segments \u6570\u636e\u5b58\u50a8\u4e8e _.cfs\u7684\u6587\u4ef6\u4e2d\u3002<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-align: left; text-indent: 0em; font-size: 16px; line-height: 1.5em;\"><strong><span style=\"font-size: 20px;\">Segment<\/span><\/strong><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"line-height: 1.5em;\"><img decoding=\"async\" style=\"width: 100%; height: auto;\" title=\"Elasticsearch\u539f\u7406\u5256\u6790\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/05\/2-1589653666.png\" alt=\"Elasticsearch\u539f\u7406\u5256\u6790\" \/><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<p style=\"text-indent: 2em; line-height: 1.75em;\">Segment \u76f4\u63a5\u63d0\u4f9b\u4e86\u641c\u7d22\u529f\u80fd\u7684\uff0cES \u7684\u4e00\u4e2a Shard \uff08Lucene Index\uff09\u4e2d\u662f\u7531\u5927\u91cf\u7684 Segment \u6587\u4ef6\u7ec4\u6210\u7684\uff0c\u4e14\u6bcf\u4e00\u6b21 fresh \u90fd\u4f1a\u4ea7\u751f\u4e00\u4e2a\u65b0\u7684 Segment \u6587\u4ef6\uff0c\u8fd9\u6837\u4e00\u6765 Segment \u6587\u4ef6\u6709\u5927\u6709\u5c0f\uff0c\u76f8\u5f53\u788e\u7247\u5316\u3002ES \u5185\u90e8\u5219\u4f1a\u5f00\u542f\u4e00\u4e2a\u7ebf\u7a0b\u5c06\u5c0f\u7684 Segment \u5408\u5e76\uff08Merge\uff09\u6210\u5927\u7684 Segment\uff0c\u51cf\u5c11\u788e\u7247\u5316\uff0c\u964d\u4f4e\u6587\u4ef6\u6253\u5f00\u6570\uff0c\u63d0\u5347 I\/O \u6027\u80fd\u3002<\/p>\n<p style=\"line-height: 1.75em;\">\n<p style=\"text-indent: 2em; line-height: 1.75em;\">Segment \u6587\u4ef6\u662f\u4e0d\u53ef\u53d8\u66f4\u7684\u3002\u5f53\u4e00\u4e2a Document \u66f4\u65b0\u7684\u65f6\u5019\uff0c\u5b9e\u9645\u4e0a\u662f\u5c06\u65e7\u7684\u6587\u6863\u6807\u8bb0\u4e3a\u5220\u9664\uff0c\u7136\u540e\u7d22\u5f15\u4e00\u4e2a\u65b0\u7684\u6587\u6863\u3002\u5728 Merge \u7684\u8fc7\u7a0b\u4e2d\u4f1a\u5c06\u65e7\u7684 Document \u5220\u9664\u6389\u3002\u5177\u4f53\u5230\u6587\u4ef6\u7cfb\u7edf\u6765\u8bf4\uff0c\u6587\u6863 A \u662f\u5199\u5165\u5230 .cfs \u6587\u4ef6\u91cc\u7684\uff0c\u5220\u9664\u6587\u6863 A \u5b9e\u9645\u4e0a\u662f\u5728.del\u6587\u4ef6\u91cc\u6807\u8bb0\u67d0\u4e2a document \u5df2\u88ab\u5220\u9664\uff0c\u90a3\u4e48\u4e0b\u6b21\u67e5\u8be2\u7684\u65f6\u5019\u5219\u4f1a\u8df3\u8fc7\u8fd9\u4e2a\u6587\u6863\uff0c\u662f\u4e3a\u903b\u8f91\u5220\u9664\u3002\u5f53\u5f52\u5e76\uff08Merge\uff09\u7684\u65f6\u5019\uff0c\u8001\u7684 segment \u6587\u4ef6\u5c06\u4f1a\u88ab\u5220\u9664\uff0c\u5408\u5e76\u6210\u65b0\u7684 segment \u6587\u4ef6\uff0c\u8fd9\u4e2a\u65f6\u5019\u4e5f\u5c31\u662f\u7269\u7406\u5220\u9664\u4e86\u3002<\/p>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"box-sizing: border-box; outline: 0px; margin: 0px 0px 16px; padding: 0px; font-size: 16px; color: #4d4d4d; overflow-wrap: break-word; font-variant-ligatures: common-ligatures; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; line-height: 1.5em;\"><img decoding=\"async\" style=\"width: auto; box-sizing: border-box; outline: none; margin: 24px 0px; padding: 0px; max-width: 100%; height: auto; overflow-wrap: break-word; cursor: zoom-in; border: 0px none initial;\" title=\"Elasticsearch\u539f\u7406\u5256\u6790\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/05\/10-1589653666.png\" alt=\"Elasticsearch\u539f\u7406\u5256\u6790\" \/><br style=\"box-sizing: border-box; outline: 0px; margin: 0px; padding: 0px; overflow-wrap: break-word;\" \/><img decoding=\"async\" style=\"width: auto; box-sizing: border-box; outline: none; margin: 24px 0px; padding: 0px; max-width: 100%; height: auto; overflow-wrap: break-word; cursor: zoom-in; border: 0px none initial;\" title=\"Elasticsearch\u539f\u7406\u5256\u6790\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/05\/4-1589653666.png\" alt=\"Elasticsearch\u539f\u7406\u5256\u6790\" \/><\/section>\n<section style=\"box-sizing: border-box; outline: 0px; margin: 0px 0px 16px; padding: 0px; font-size: 16px; color: #4d4d4d; overflow-wrap: break-word; font-variant-ligatures: common-ligatures; font-family: 'Microsoft YaHei', 'SF Pro Display', Roboto, Noto, Arial, 'PingFang SC', sans-serif; line-height: 1.5em;\">\u65b0\u5efaindex\uff0c\u4f46\u662f\u8fd8\u672a\u63d2\u5165\u6570\u636e\u65f6\u7684\u76ee\u5f55\u7ed3\u6784\uff1a<\/section>\n<section style=\"line-height: 1.5em;\"><img decoding=\"async\" style=\"width: auto;\" title=\"Elasticsearch\u539f\u7406\u5256\u6790\" src=\"http:\/\/www.zhushiyao.com\/wp-content\/uploads\/2020\/05\/0-1589653666.png\" alt=\"Elasticsearch\u539f\u7406\u5256\u6790\" \/><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">\u63d2\u5165\u6570\u636e\u4e4b\u540e\u4f1a\u591a\u5f88\u591a\u6587\u4ef6\uff1a<\/section>\n<ul class=\"list-paddingleft-2\" style=\"list-style-type: disc;\">\n<li>\u5b58\u50a8\u539f\u6587_source\u7684\u6587\u4ef6.fdt .fdm .fdx;<\/li>\n<li>\u5b58\u50a8\u5012\u6392\u7d22\u5f15\u7684\u6587\u4ef6.tim .tip .doc;<\/li>\n<li>\u7528\u4e8e\u805a\u5408\u6392\u5e8f\u7684\u5217\u5b58\u6587\u4ef6.dvd .dvm;<\/li>\n<li>\u5168\u6587\u68c0\u7d22\u6587\u4ef6.pos .pay .nvd .nvm\u7b49\u3002<\/li>\n<li>\u52a0\u8f7d\u5230\u5185\u5b58\u4e2d\u7684\u6587\u4ef6\u6709.fdx .tip .dvm\uff0c<\/li>\n<li>\u5176\u4e2d.tip\u5360\u7528\u5185\u5b58\u6700\u5927\uff0c\u800c.fdt . tim .dvd\u6587-\u4ef6\u5360\u7528\u78c1\u76d8\u6700\u5927<\/li>\n<li>\u53e6\u5916segment\u8f83\u5c0f\u65f6\u6587\u4ef6\u5185\u5bb9\u662f\u4fdd\u5b58\u5728.cfs\u6587\u4ef6\u4e2d\uff0c.cfe\u6587\u4ef6\u4fdd\u5b58Lucene\u5404\u6587\u4ef6\u5728.cfs\u6587\u4ef6\u7684\u4f4d\u7f6e\u4fe1\u606f\uff0c\u8fd9\u662f\u4e3a\u4e86\u51cf\u5c11Lucene\u6253\u5f00\u7684\u6587\u4ef6\u53e5\u67c4\u6570\u3002<\/li>\n<\/ul>\n<section style=\"text-indent: 2em; line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\"><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<p style=\"line-height: 1.5em; text-indent: 2em;\"><span style=\"font-size: 15px;\">\u5b58\u50a8\u6587\u4ef6\u7c7b\u578b\u6bd4\u8f83\u53ef\u89c1\uff1ahttps:\/\/www.itcodemonkey.com\/article\/8954.html<\/span><\/p>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"line-height: 1.5em; text-indent: 0em;\"><strong><span style=\"font-size: 20px;\">\u53c2\u8003\u94fe\u63a5<\/span><\/strong><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\"><span style=\"font-size: 14px;\">https:\/\/zhuanlan.zhihu.com\/p\/33671444<\/span><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\"><span style=\"font-size: 14px;\">https:\/\/yq.aliyun.com\/articles\/581877<\/span><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\"><span style=\"font-size: 14px;\">https:\/\/www.cnblogs.com\/LBSer\/p\/4119841.html<\/span><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\"><span style=\"font-size: 14px;\">https:\/\/my.oschina.net\/u\/2935389\/blog\/754674<\/span><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\"><span style=\"font-size: 14px;\">https:\/\/blog.csdn.net\/yangwenbo214\/article\/details\/77802331<\/span><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\"><span style=\"font-size: 14px;\">https:\/\/www.jianshu.com\/p\/2cac077e05cf<\/span><\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section style=\"text-indent: 2em; line-height: 1.5em;\">\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014\u2014<\/section>\n<section style=\"line-height: 1.5em;\"><\/section>\n<section>\n<\/section>\n<section>\n<p style=\"margin: 0px; padding: 0px; clear: both;\"><span style=\"margin: 0px; padding: 0px; font-size: 14px; color: #3da742;\">\u4f5c\u8005\uff1a<span style=\"text-indent: 34px;\">lhj_sjtu<\/span><\/span><\/p>\n<p style=\"margin: 0px; padding: 0px; clear: both;\"><span style=\"margin: 0px; padding: 0px; font-size: 14px; color: #3da742;\">\u539f\u6587\uff1a<span style=\"text-indent: 34px;\">https:\/\/blog.csdn.net\/weixin_36564655\/java\/article\/details\/82736327<\/span><\/span><\/p>\n<p style=\"margin: 0px; padding: 0px; clear: both;\">\n<section style=\"margin: 0px; padding: 0px; max-width: 100%; color: #3e3e3e; font-size: 16px; line-height: 25.6px; background-color: #ffffff; font-family: \u5fae\u8f6f\u96c5\u9ed1; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"margin: 0px; padding: 0px; max-width: 100%; line-height: 25.6px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"margin: 0px; padding: 0px; max-width: 100%; line-height: 25.6px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<p style=\"text-align: center; margin: 0px; padding: 0px; clear: both; max-width: 100%; min-height: 1em; box-sizing: border-box !important; overflow-wrap: break-word !important;\"><strong style=\"margin: 0px; padding: 0px; max-width: 100%; font-size: 16.3636px; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\u00b7END\u00b7<\/strong><\/p>\n<section class=\"appmsg_search_iframe_wrp\"><\/section>\n<article style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<section style=\"margin: 20px 0px; padding: 0px; max-width: 100%; box-sizing: border-box; overflow-wrap: break-word !important;\">\n<section style=\"margin: 0px; padding: 0px; max-width: 100%; box-sizing: border-box; min-width: 0px; font-size: 14px; overflow-wrap: break-word !important; border: 0px none initial;\">\n<section style=\"margin: 0px; padding: 0px; max-width: 100%; min-width: 0px; font-size: 16.3636px; text-align: center; box-sizing: border-box !important; overflow-wrap: break-word !important; border: 0px initial initial;\">\n<section style=\"margin: 0px; padding: 0px; max-width: 100%; display: inline-block; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<p style=\"text-align: center; margin: 0px; padding: 0px; clear: both; color: #3e3e3e; font-size: 16.3636px; max-width: 100%; min-height: 1em; line-height: 25.6px; font-family: \u5fae\u8f6f\u96c5\u9ed1; box-sizing: border-box !important; overflow-wrap: break-word !important;\">\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/article>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd1\u671fElasticsearch\u7684\u95ee\u9898\u4e0d\u5c11\uff0c\u7279\u522b\u662f\u524d\u4e9b\u65e5\u5b50\u7684108\u4ebf\u548c50w\u6570\u636e\u6cc4\u9732\u7684\u5b89\u5168\u95ee\u9898\u3002 Master\/ &hellip; <a href=\"http:\/\/www.zhushiyao.com\/?p=26137\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cElasticsearch\u539f\u7406\u5256\u6790\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[541],"_links":{"self":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts\/26137"}],"collection":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=26137"}],"version-history":[{"count":2,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts\/26137\/revisions"}],"predecessor-version":[{"id":26151,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=\/wp\/v2\/posts\/26137\/revisions\/26151"}],"wp:attachment":[{"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=26137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=26137"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.zhushiyao.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=26137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}