{"id":194430,"date":"2020-11-02T00:11:14","date_gmt":"2020-11-01T16:11:14","guid":{"rendered":"http:\/\/4563.org\/?p=194430"},"modified":"2020-11-02T00:11:14","modified_gmt":"2020-11-01T16:11:14","slug":"%e8%af%b7%e6%95%99%e4%b8%8b-elasticsearch-%e5%bc%80%e5%8f%91%e7%9b%b8%e5%85%b3%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=194430","title":{"rendered":"\u8bf7\u6559\u4e0b ElasticSearch \u5f00\u53d1\u76f8\u5173\u95ee\u9898"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u8bf7\u6559\u4e0b ElasticSearch \u5f00\u53d1\u76f8\u5173\u95ee\u9898               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : hush3 <\/span>  <span><i><\/i> 7<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6700\u8fd1\u8981\u5728\u9879\u76ee\u4e2d\u4e0a es \u4e86\uff0c\u5bf9\u4e8e\u4e00\u4e9b\u5f00\u53d1\u4e0a\u7684\u9009\u62e9\u4e0d\u77e5\u5982\u4f55\u51b3\u5b9a\uff0c\u662f\u5426\u6709\u7c7b\u4f3c Java \u5f00\u53d1\u89c4\u8303\u4e00\u6837\u7684 es \u89c4\u8303\uff1f<\/p>\n<p>\u4e3b\u8981\u7528\u4e8e\u975e\u65e5\u5fd7\u6570\u636e\u7684\u5b58\u50a8\u4e0e\u68c0\u7d22\uff0c\u6709\u5982\u4e0b 2 \u4e2a\u95ee\u9898\uff1a<\/p>\n<p>1 ES \u4e2d\u53ef\u4ee5\u4f7f\u7528\u52a8\u6001\u6a21\u677f\uff0c\u4f46\u5bf9\u4e8e\u4e00\u4e2a\u7d22\u5f15\u4e2d\u786e\u5b9a\u7684\u5b57\u6bb5\uff0c\u662f\u50cf mysql \u4e00\u6837\u628a\u5b57\u6bb5\u90fd\u5199\u5728 mapping \u4e2d\uff0c\u57fa\u672c\u4e0d\u4f7f\u7528\u52a8\u6001\u6a21\u677f\uff0c\u8fd8\u662f\u4f9d\u8d56\u52a8\u6001 mapping \u53bb\u751f\u6210\uff1f\uff08\u89c4\u5b9a\u597d\u4e00\u4e2a\u5168\u5c40\u52a8\u6001\u6a21\u677f\uff09<\/p>\n<p>2 ES \u4e2d\u63a8\u8350\u4f7f\u7528\u522b\u540d\uff0c\u4f46\u63d2\u5165\u6570\u636e\u65f6\u9700\u8981\u771f\u5b9e\u7d22\u5f15\u540d\uff0c\u5728\u5f00\u53d1\u4e2d\u662f\u5426\u6709\u5fc5\u8981\u4e00\u5b9a\u8981\u4e0a\u522b\u540d\uff1f\u5982\u679c\u8981\u4e0a\u7684\u8bdd\uff0c\u522b\u540d\u4e0e\u771f\u5b9e\u7d22\u5f15\u540d\u7684\u5bf9\u5e94\u5173\u7cfb\u662f\u4e0d\u662f\u5e94\u8be5\u786c\u7f16\u7801\u5728\u67d0\u4e2a\u5730\u65b9\uff1f\uff08\u6ca1\u6709\u67e5\u5230\u600e\u4e48\u6839\u636e\u522b\u540d\u67e5\u5bf9\u5e94\u7d22\u5f15\u540d&#8230;\uff09<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>3<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4115514\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : gtexpanse <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             1. \u5c3d\u91cf\u4e00\u5f00\u59cb\u5c31\u6307\u5b9a mapping \u7c7b\u578b\uff0c\u56e0\u4e3a\u6570\u636e\u91cf\u5927\u4e86\u4e4b\u540e\u80af\u5b9a\u8981\u8003\u8651\u8fd9\u4e2a\u95ee\u9898<br \/>2. \u63d2\u5165\u6570\u636e\u6ca1\u9650\u5236\u771f\u5b9e\u7d22\u5f15\u540d\u554a\uff08\u83ab\u975e\u662f\u65b0\u7279\u6027\uff1f\uff09\uff0c\u522b\u540d\u5efa\u8bae\u8bfb\u5199\u5206\u79bb\u4e24\u4e2a\u522b\u540d\uff0c\u540e\u671f rebuild \u5168\u9760\u522b\u540d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4115515\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : alexfarm <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7d22\u5f15\u91cf\u8f83\u5927\u5efa\u8bae\u6309\u65e5\u62c6\u5206\u7d22\u5f15\uff0c\u90a3\u5c31\u9700\u8981\u522b\u540d\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4115516\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : hush3 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @gtexpanse \u6bd4\u5982\u8fd8\u6ca1\u91c7\u7528\u6309\u65e5\u671f\u5206\u7d22\u5f15\uff0c\u4e00\u4e2a\u7d22\u5f15\u53eb idx_user \u7ed9\u4ed6\u5f04\u4e2a\u522b\u540d\u53eb user \u7684\u8bdd \u6211\u5728\u4ee3\u7801\u91cc\u5c31\u8981\u9488\u5bf9\u67e5\u8be2\u64cd\u4f5c\uff0c\u4f7f\u7528 user \u4f5c\u4e3a\u7d22\u5f15\u540d\u7684\u53c2\u6570\uff0c \u9488\u5bf9\u63d2\u5165\u6570\u636e\u7684\u64cd\u4f5c\uff0c\u4f7f\u7528 idx_user \u4f5c\u4e3a\u7d22\u5f15\u540d\u53c2\u6570\uff0c\u662f\u8fd9\u6837\u5417\uff1f \u90a3\u662f\u4e0d\u662f\u5c31\u8981\u6709\u4e2a\u5730\u65b9\u4fdd\u5b58\u8fd9\u4e24\u4e2a\u540d\u5b57\u4e4b\u95f4\u7684\u5bf9\u5e94\u5173\u7cfb&#8230;<br \/>\u53e6\u5916\u540e\u671f\u52a0\u4e2a\u5b57\u6bb5\uff0c\u4e0d\u7ed9\u4e4b\u524d\u65e7\u7684\u7d22\u5f15\u52a0\uff0c\u6216\u8005\u5e72\u8106\u4f7f\u7528 update_by_query \u6279\u91cf\u52a0\u53ef\u4e0d\u53ef\u4ee5\u5462\uff1f\u4e00\u5b9a\u8981 reindex \u5417\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u8bf7\u6559\u4e0b ElasticSearch&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/194430"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=194430"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/194430\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=194430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=194430"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=194430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}