{"id":278939,"date":"2021-01-14T02:20:44","date_gmt":"2021-01-13T18:20:44","guid":{"rendered":"http:\/\/4563.org\/?p=278939"},"modified":"2021-01-14T02:20:44","modified_gmt":"2021-01-13T18:20:44","slug":"%e5%88%86%e4%ba%ab%e4%b8%80%e4%b8%aa%e5%9f%ba%e4%ba%8e-rust-%e7%9a%84%e6%90%9c%e7%b4%a2%e5%bc%95%e6%93%8e-meilisearch","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=278939","title":{"rendered":"\u5206\u4eab\u4e00\u4e2a\u57fa\u4e8e Rust \u7684\u641c\u7d22\u5f15\u64ce MeiliSearch"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5206\u4eab\u4e00\u4e2a\u57fa\u4e8e Rust \u7684\u641c\u7d22\u5f15\u64ce MeiliSearch               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : vus520 <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>MeiliSearch \u662f\u8fd1\u4e24\u5e74\u5f00\u6e90\u7684\u4e00\u4e2a\u9879\u76ee\uff0c\u4e3b\u8981\u76ee\u6807\u662f\u5728\u5c0f\u6570\u636e\u89c4\u6a21\u4e0b\u5b9e\u73b0\u6bd4 ES \u66f4\u52a0\u5feb\u901f\u548c\u6613\u7528\u7684\u641c\u7d22\u4f53\u9a8c\u3002<\/p>\n<p>\u4e3b\u9875<\/p>\n<blockquote>\n<p>https:\/\/github.com\/meilisearch\/MeiliSearch<\/p>\n<\/blockquote>\n<p>\u6587\u6863<\/p>\n<blockquote>\n<p>https:\/\/docs.meilisearch.com\/<\/p>\n<\/blockquote>\n<p>\u4e0a\u5468\u53d1\u73b0 MeiliSearch \u5df2\u7ecf\u652f\u6301\u4e2d\u6587\u5206\u8bcd\uff0c\u4e8e\u662f\u8fdb\u884c\u4e86\u6df1\u5165\u7684\u8c03\u7814\u3002<\/p>\n<p>(\u65c1\u767d\uff0c\u56de\u5934\u627e\u8001\u5916\u95ee\u95ee\uff0c\u4ed6\u4eec\u548b\u7ed9\u9879\u76ee\u8d77\u4e86\u4e00\u4e2a\u4e2d\u6587\u540d\u53eb<code>Meili<\/code>?)<\/p>\n<p>MeiliSearch \u652f\u6301\u7684\u529f\u80fd\u5982\u4e0b<\/p>\n<ol>\n<li>\u5f00\u6e90<\/li>\n<li>\u7528\u6237\u91cf(\u5f00\u6e90\u641c\u7d22\u5f15\u64ce\u7b2c\u4e8c\u540d)<\/li>\n<li>\u4e2d\u6587\u5206\u8bcd<\/li>\n<li>\u540c\u4e49\u8bcd<\/li>\n<li>\u7ea0\u9519<\/li>\n<li>\u9ad8\u4eae<\/li>\n<li>\u5168\u6587\u8fd4\u56de<\/li>\n<li>\u9ad8\u7ea7\u641c\u7d22<\/li>\n<li>\u505c\u7528\u8bcd\u3001\u505c\u7528\u5b57\u6bb5<\/li>\n<li>\u52a0\u6743\u3001\u964d\u6743<\/li>\n<li>\u903b\u8f91\u641c\u7d22<\/li>\n<li>\u552f\u4e00\u5b57\u6bb5\u805a\u5408<\/li>\n<li>\u5206\u9875<\/li>\n<li>\u91cd\u65b0\u7d22\u5f15<\/li>\n<\/ol>\n<p>\u6211\u4eec\u76ee\u524d\u5728\u7528 OpenSearch\uff0c\u540c\u65f6\u4e5f\u5728\u5c1d\u8bd5\u8ddf kalasearch \u8fdb\u884c\u6c9f\u901a\u3002\u5361\u62c9\u641c\u7d22\u662f\u4e00\u4e2a\u65b0\u7684\u641c\u7d22\u670d\u52a1\u521b\u4e1a\u516c\u53f8\uff0c\u53ef\u80fd\u662f\u56e0\u4e3a\u516c\u53f8\u89c4\u6a21\u5c0f\u4eba\u624b\u4e0d\u591f\uff0c\u4ed6\u4eec\u76ee\u524d\u53ea\u5bf9\u660e\u786e\u4ed8\u8d39\u7684\u5ba2\u6237\u670d\u52a1\u3002<\/p>\n<p>\u5bf9\u4e8e\u641c\u7d22\u5f15\u64ce\u6765\u8bb2\uff0c\u4ee5\u4e0b\u51e0\u4e2a\u529f\u80fd\u5c24\u5176\u91cd\u8981<\/p>\n<ol>\n<li>\u8bcd\u5e93\u52a8\u6001\u7d22\u5f15\uff0c\u5361\u62c9\u652f\u6301\u65b0\u8bcd\u53d1\u73b0\u5e76\u91cd\u65b0\u7d22\u5f15\uff0cOS \u652f\u6301\u81ea\u5b9a\u4e49\u8bcd\u5e93\u548c\u5185\u7f6e\u8bcd\u5e93\uff0c\u4f46\u9700\u8981\u624b\u5de5\u7d22\u5f15\uff0cES \u540c\u7406<\/li>\n<li>\u4e2d\u6587<\/li>\n<li>\u540c\u4e49\u8bcd<\/li>\n<li>\u5206\u9875<\/li>\n<li>\u590d\u6742\u7684\u641c\u7d22\u8bed\u6cd5<\/li>\n<li>\u6743\u91cd\u7ba1\u7406<\/li>\n<li>\u5feb\u901f<\/li>\n<li>\u6613\u7528<\/li>\n<\/ol>\n<p>ES \u505a\u4e3a\u8001\u724c\u641c\u7d22\u5f15\u64ce\uff0c\u529f\u80fd\u57fa\u672c\u6ee1\u8db3\uff0c\u4f46\u590d\u6742\uff0c\u91cd\u91cf\u7ea7\uff0c\u9002\u5408\u5927\u6570\u636e\u91cf\u3002 Meili \u8bbe\u8ba1\u76ee\u6807\u9488\u5bf9\u6570\u636e\u5728 500GB \u5de6\u53f3\u7684\u641c\u7d22\u9700\u6c42\uff0c\u6781\u5feb\uff0c\u5355\u6587\u4ef6\uff0c\u8d85\u8f7b\u91cf\u3002<\/p>\n<blockquote>\n<p>MeiliSearch is a RESTful search API. It aims to be a ready-to-go solution for everyone who wants a fast and relevant search experience for their end-users<\/p>\n<\/blockquote>\n<p>Meili \u771f\u7684\u505a\u4e86\u4e00\u4e2a\u547d\u4ee4\u5c31\u53ef\u4ee5\u5b8c\u6210\u5b89\u88c5\u548c\u4f7f\u7528\uff0c\u5b89\u88c5\u65b9\u4fbf\uff0c\u641c\u7d22\u901f\u5ea6\u98de\u5feb\u3002<\/p>\n<p>\u8be6\u7ec6\u529f\u80fd\u53ef\u4ee5\u53c2\u8003<\/p>\n<blockquote>\n<p>https:\/\/docs.meilisearch.com\/#features<\/p>\n<\/blockquote>\n<p>Meili \u7684\u4e2d\u6587\u5206\u8bcd\u529f\u80fd\uff0c\u521a\u521a\u5b8c\u6210\u5f00\u53d1\uff0c\u5e76\u672a\u5408\u5e76\u5230\u4e3b\u5206\u652f\uff0c\u6240\u4ee5\u9700\u8981\u81ea\u884c\u7f16\u8bd1\u3002 \u76ee\u524d\u652f\u6301\u4e2d\u6587\u5206\u8bcd\u7684\u5206\u652f\u662f 0.18.0<\/p>\n<pre><code>+## v0.18.0 + +  - Integration with the new tokenizer (#1091) +  - Fix setting consistency bug (#1128) +  - Fix attributes to retrieve bug (#1131) +  - Increase default payload size (#1147) +  - Improvements to code quality (#1167, #1165, #1126, #1161) + <\/code><\/pre>\n<p>\u7f16\u8bd1\u65b9\u6cd5<\/p>\n<pre><code>git clone https:\/\/github.com\/meilisearch\/MeiliSearch.git cd MeiliSearch rustup override set stable <\/code><\/pre>\n<p>\u5982\u679c\u4f60\u8fd8\u6ca1\u6709\u5b89\u88c5 Rust\uff0c\u53ef\u4ee5\u81ea\u884c\u67e5\u627e\u8d44\u6599\uff0c\u5b89\u88c5 <code>Rust<\/code> \u548c\u5305\u7ba1\u7406\u5668 <code>cargo<\/code><\/p>\n<pre><code>curl --proto '=https' --tlsv1.2 -sSf https:\/\/sh.rustup.rs | sh source $HOME\/.cargo\/env <\/code><\/pre>\n<p>\u4f9d\u8d56\u5b89\u88c5\u8fc7\u7a0b\u6bd4\u8f83\u7f13\u6162\uff0c\u4e0d\u8fc7\u597d\u5728\u6211\u6709 <code>ClassX Pro<\/code>\uff0c\u7f16\u8bd1\u8fc7\u7a0b\u611f\u89c9\u6bd4 Golang \u8981\u6162\uff0c\u4e0d\u77e5\u9053\u662f\u4e0d\u662f\u6211\u7684\u9519\u89c9\u3002<\/p>\n<p>\u542f\u52a8\u547d\u4ee4\u975e\u5e38\u7b80\u5355<\/p>\n<pre><code>.\/meilisearch  <\/code><\/pre>\n<p>Meili \u4e0d\u4f7f\u7528\u914d\u7f6e\u6587\u4ef6\u8fdb\u884c\u914d\u7f6e\uff0c\u800c\u662f\u4f7f\u7528\u53c2\u6570\u6216\u8005\u73af\u5883\u53d8\u91cf\u8fdb\u884c\u63a7\u5236<\/p>\n<blockquote>\n<p>https:\/\/docs.meilisearch.com\/guides\/advanced_guides\/configuration.html#options<\/p>\n<\/blockquote>\n<p>\u63a5\u4e0b\u6765\uff0c\u8fdb\u884c\u7d22\u5f15\u548c\u641c\u7d22\u6d4b\u8bd5<\/p>\n<h3>\u914d\u7f6e\u7d22\u5f15\uff0c\u7d22\u5f15\u4e0d\u9700\u8981\u6307\u5b9a\u5b57\u6bb5\u548c\u7c7b\u4f3c\uff0c\u4e0d\u7528\u62c5\u5fc3 ES \u7684 mapping \u51b2\u7a81\u95ee\u9898<\/h3>\n<pre><code>curl -d '{   \"uid\": \"movies\",   \"primaryKey\": \"id\" }'  http:\/\/127.0.0.1:7700\/indexes <\/code><\/pre>\n<h3>\u6dfb\u52a0\u6d4b\u8bd5\u6570\u636e<\/h3>\n<pre><code>curl -X POST 'http:\/\/127.0.0.1:7700\/indexes\/movies\/documents'   --data @movies.json <\/code><\/pre>\n<p>\u505a\u5b8c\u8fd9\u4e00\u6b65\u5c31\u53ef\u4ee5\u6253\u5f00 WebUI <code>http:\/\/127.0.0.1:7700<\/code> \u8fdb\u884c\u641c\u7d22\u6d4b\u8bd5\u4e86<\/p>\n<h3>\u63a5\u4e0b\u6765\u901a\u8fc7\u63a5\u53e3\u914d\u7f6e\u4e00\u4e9b\u540c\u4e49\u8bcd<\/h3>\n<pre><code>curl -d '{     \"\u626b\u9ed1\": [         \"\u9664\u9ed1\",         \"\u6253\u9ed1\"     ],     \"\u9664\u9ed1\": [         \"\u626b\u9ed1\",         \"\u6253\u9ed1\"     ],     \"\u6253\u9ed1\": [         \"\u9664\u9ed1\",         \"\u626b\u9ed1\"     ], }'  http:\/\/127.0.0.1:7700\/indexes\/wechat\/settings\/synonyms <\/code><\/pre>\n<p>\u540c\u4e49\u8bcd\u662f\u5355\u5411\u7684\uff0c\u6240\u4ee5\u8fd9\u91cc\u9700\u8981\u914d\u7f6e\u591a\u6b21\u5217\u8868\u3002\u90a3\u4e48\u95ee\u9898\u6765\u4e86\uff0c\u5982\u679c\u6211\u6709\u51e0\u5341\u4e07\u540c\u4e49\u8bcd\uff0c\u5e94\u8be5\u600e\u4e48\u914d\u7f6e\u5462\u3002 \u540c\u4e49\u8bcd\u7684\u8bcd\u6797\uff0c\u4e00\u822c\u5efa\u8bae\u4f7f\u7528\u54c8\u5de5\u5927\u7684\u8bcd\u5e93\uff0c\u4e0b\u56de\u6211\u4eec\u7ec6\u8bb2\u3002<\/p>\n<h3>\u540c\u4e49\u8bcd\u641c\u7d22\u6d4b\u8bd5<\/h3>\n<pre><code>curl -d '{     \"q\": \"\u626b\u9ec4\" }'  http:\/\/127.0.0.1:7700\/indexes\/movies\/search <\/code><\/pre>\n<p>\u4eca\u5929\u4e0a\u5348\u6478\u9c7c\u7ed3\u675f\uff0c\u4e0b\u56de\u63a5\u7740\u8bb2\u8bcd\u5e93\u7ba1\u7406\u3002<\/p>\n<p>\u9996\u53d1\u5730\u5740<\/p>\n<blockquote>\n<blockquote class=\"wp-embedded-content\" data-secret=\"uYUStLLW3v\"><p><a href=\"https:\/\/www.4wei.cn\/archives\/1002848\">MeiliSearch \u4ece\u5165\u95e8\u5230\u4e0d\u7cbe\u901a<\/a><\/p><\/blockquote>\n<p><iframe class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"\u300a MeiliSearch \u4ece\u5165\u95e8\u5230\u4e0d\u7cbe\u901a \u300b\u2014\u5c18\u7f18\u7684\u535a\u5ba2\" src=\"https:\/\/www.4wei.cn\/archives\/1002848\/embed#?secret=7cU3djuEmy#?secret=uYUStLLW3v\" data-secret=\"uYUStLLW3v\" width=\"600\" height=\"338\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<\/blockquote><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>0<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5206\u4eab\u4e00\u4e2a\u57fa\u4e8e Rust \u7684\u641c\u7d22\u5f15\u64ce&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\/278939"}],"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=278939"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/278939\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=278939"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=278939"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=278939"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}