{"id":428725,"date":"2021-04-18T06:24:33","date_gmt":"2021-04-17T22:24:33","guid":{"rendered":"http:\/\/4563.org\/?p=428725"},"modified":"2021-04-18T06:24:33","modified_gmt":"2021-04-17T22:24:33","slug":"mongodb-%e5%92%8c-elasticsearch-%e6%80%8e%e4%b9%88%e9%85%8d%e5%90%88%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=428725","title":{"rendered":"mongodb \u548c elasticsearch \u600e\u4e48\u914d\u5408\u4f7f\u7528"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  mongodb \u548c elasticsearch \u600e\u4e48\u914d\u5408\u4f7f\u7528               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : taomujian <\/span>  <span><i><\/i> 5<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>mongodb \u7528\u6765\u5b58\u50a8\u6570\u636e,elasticsearch \u7528\u505a\u641c\u7d22\u5f15\u64ce,\u770b\u7f51\u4e0a\u6559\u7a0b\u8bf4,\u9700\u8981 mongodb \u540c\u6b65\u5230 elasticsearch,\u8fd9\u6837\u7684\u8bdd\u7528 mongodb \u5b58\u50a8\u6570\u636e\u6709\u5565\u610f\u4e49\u5462\uff1f\u5f80\u5404\u4f4d\u5927\u4f6c\u8d50\u6559<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>7<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5643409\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Mithril <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             &#8211; \u4f60\u53ef\u80fd\u4e0d\u662f\u6240\u6709\u6570\u636e\u90fd\u9700\u8981\u6254\u5230 ES \u91cc\u9762\u505a\u68c0\u7d22\uff0c\u6ca1\u5fc5\u8981\u7684\u6570\u636e\u4e0d\u8981\u653e\u8fdb\u53bb\u3002<br \/>&#8211; \u4f60\u6709\u53ef\u80fd\u9700\u8981\u4fdd\u8bc1\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u7684\u4e00\u81f4\u6027\u3002<br \/>\u672c\u8d28\u4e0a ES \u5c31\u662f\u4e2a\u641c\u7d22\u5f15\u64ce\uff0c\u4f60\u6700\u597d\u8fd8\u662f\u62ff\u5b83\u5f53\u641c\u7d22\u5f15\u64ce\u7528\u3002\u867d\u8bf4\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u4e5f\u53ef\u4ee5\u5f53\u6210 NoSQL \u6570\u636e\u5e93\uff0c\u4f46\u5b9e\u9645\u4f7f\u7528\u7684\u65f6\u5019\uff0c\u9664\u975e\u4f60\u7684\u5e94\u7528\u573a\u666f\u975e\u5e38\u5408\u9002\uff0c\u53ef\u4ee5\u4ece\u9700\u6c42\u4e0a\u907f\u5f00\u62ff ES \u5f53\u6570\u636e\u5e93\u4f7f\u7528\u65f6\u7684\u7f3a\u70b9\uff0c\u4e0d\u7136\u4e0d\u8981\u8fd9\u4e48\u641e\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5643410\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : taomujian <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u597d\u7684\uff0c\u8c22\u8c22\u89e3\u7b54                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5643411\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : chendy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             mongodb \u505a\u4e3b\u6570\u636e\u5e93\uff0ces \u505a\u641c\u7d22\uff0c\u628a\u9700\u8981\u641c\u7d22\u7684\u6570\u636e\u4ece mongodb \u540c\u6b65\u5230 es                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5643412\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jun0205 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u4ee5\u7528 https:\/\/github.com\/rwynn\/monstache \u540c\u6b65\u6570\u636e\uff0cmonstache \u53ef\u4ee5\u81ea\u5df1\u5199\u811a\u672c\u540c\u6b65\u9700\u8981\u7684\u6570\u636e\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5643413\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : libook <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             ES \u548c MongoDB \u7684\u800c\u5e94\u7528\u573a\u666f\u4e0d\u4e00\u6837\uff0c\u5b9a\u4f4d\u4e5f\u4e0d\u4e00\u6837\uff0c\u5404\u81ea\u64c5\u957f\u548c\u4e0d\u64c5\u957f\u7684\u4e8b\u60c5\u4e5f\u4e0d\u4e00\u6837\u3002<\/p>\n<p>ES \u4e0d\u662f\u6570\u636e\u5e93\uff0c\u6ca1\u6cd5\u4fdd\u969c\u6570\u636e\u4e00\u81f4\u6027\uff0c\u56e0\u4e3a\u5b58\u5728\u5237\u65b0\u5468\u671f\uff0c\u6240\u4ee5\u4f60\u8bfb\u53d6\u7684\u6570\u636e\u603b\u662f\u4e0a\u4e00\u6b21\u5237\u65b0\u7684\u6570\u636e\uff0c\u5982\u679c\u5728\u6b64\u671f\u95f4\u6709\u4efb\u4f55\u6570\u636e\u53d8\u5316\uff0c\u4f60\u662f\u62ff\u4e0d\u5230\u6700\u65b0\u7684\u6570\u636e\u7684\uff0c\u53ea\u80fd\u7b49\u4e0b\u4e00\u4e2a\u5237\u65b0\u5468\u671f\u3002\u5f3a\u4e00\u81f4\u6027\u9700\u6c42\u662f\u6570\u636e\u5e93\u7684\u5f3a\u9879\uff0c\u4f60\u67e5\u8be2 MongoDB \u4e0d\u53ef\u80fd\u8fd4\u56de\u4e00\u4e2a\u8fc7\u65f6\u7684\u6570\u636e\u3002<\/p>\n<p>\u4f20\u7edf\u4e1a\u52a1\u6570\u636e\u5e93\u7684\u7d22\u5f15\u673a\u5236\u6709\u4e2a\u9650\u5236\uff0c\u5c31\u662f\u7d22\u5f15\u8d8a\u591a\u5199\u6027\u80fd\u8d8a\u5dee\uff0c\u800c\u4e14\u6bcf\u4e00\u6761\u7d22\u5f15\u90fd\u6709\u5f88\u9ad8\u7684\u4e13\u80fd\u6027\uff0c\u6240\u9002\u7528\u7684\u67e5\u8be2\u573a\u666f\u6781\u5176\u6709\u9650\u3002\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u540e\u53f0\u4e00\u4e2a\u8868\u5355\u6709 20 \u4e2a\u67e5\u8be2\u5b57\u6bb5\uff0c\u7528\u6237\u4f1a\u968f\u673a\u9009\u53d6\u5176\u4e2d\u4efb\u610f\u6570\u91cf\u7684\u5b57\u6bb5\u7ec4\u5408\u67e5\u8be2\uff0c\u6bcf\u79cd\u7ec4\u5408\u51fa\u73b0\u7684\u6982\u7387\u76f8\u5f53\u4e14\u8981\u6c42\u67e5\u8be2\u901f\u5ea6\u90fd\u8981\u5f88\u5feb\uff1b\u5982\u679c\u7528\u4e1a\u52a1\u6570\u636e\u5e93\u8bbe\u8ba1\u7d22\u5f15\u7684\u8bdd\uff0c\u7406\u8bba\u4e0a\u53ef\u80fd\u9700\u8981 20 \u7684\u5168\u7ec4\u5408\u90a3\u4e48\u591a\u7684\u7d22\u5f15\uff0c\u90fd\u522b\u8bf4 20 \u7684\u5168\u7ec4\u5408\u4e86\uff0c\u5e38\u89c1\u7684\u4e1a\u52a1\u6570\u636e\u5e93\u4e00\u4e2a\u8868\u4e0a\u6709 20 \u6761\u7d22\u5f15\u5c31\u5f88\u8ba9\u4eba\u5934\u75bc\u4e86\u3002\u8fd9\u5c31\u662f\u641c\u7d22\u5f15\u64ce\u7684\u7528\u6b66\u4e4b\u5730\u4e86\u3002<\/p>\n<p>MongoDB \u6709\u4e00\u4e2a Change Streams \u7684\u673a\u5236\uff0c\u53ef\u4ee5\u7528\u7a0b\u5e8f\u76d1\u542c\u8868\u6570\u636e\u53d8\u5316\uff0c\u8fd9\u4e2a\u673a\u5236\u53ef\u4ee5\u7528\u6765\u540c\u6b65 MongoDB \u7684\u6570\u636e\u5230 ES\uff0c\u4e8e\u662f\u6570\u636e\u7684\u5199\u64cd\u4f5c\u548c\u5f3a\u4e00\u81f4\u6027\u8bfb\u64cd\u4f5c\u90fd\u5728 MongoDB \u4e0a\u8fdb\u884c\uff0c\u4e0d\u8981\u6c42\u4e00\u81f4\u6027\u7684\u8bfb\u64cd\u4f5c\uff08\u6bd4\u5982\u540e\u53f0\u62a5\u8868\u67e5\u8be2\u53ef\u4ee5\u5bb9\u5fcd\u51e0\u79d2\u7684\u6570\u636e\u6ede\u540e\u6027\u7684\u8bdd\uff09\u53ef\u4ee5\u5230 ES \u91cc\u67e5\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5643414\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : taomujian <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u611f\u8c22\u5404\u4f4d\u7684\u89e3\u7b54                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5643415\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : mensa23 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u540c\u6b65\u6570\u636e\u4f1a\u662f\u4e00\u4e2a\u5de8\u5751\uff0c\u5982\u679c\u4f60\u7684 mongodb \u6570\u636e\u7ed3\u6784\u4f1a\u53d8\uff0c\u90a3\u5c31\u4f1a\u5bfc\u81f4 elasticsearch \u6bcf\u6b21\u540c\u6b65\u6570\u636e\u90fd\u8981\u5efa\u7acb\u65b0\u7684 mapping \u3002\u6240\u4ee5\u5efa\u8bae\u53ea\u5efa\u7acb\u5fc5\u8981\u6570\u636e\u7684 mapping\uff0c\u4e0d\u8981\u5c06\u6240\u6709\u6570\u636e\u90fd\u540c\u6b65\u8fc7\u53bb\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>mongodb \u548c elastic&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\/428725"}],"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=428725"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/428725\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=428725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=428725"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=428725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}