{"id":124396,"date":"2020-06-26T18:07:40","date_gmt":"2020-06-26T10:07:40","guid":{"rendered":"http:\/\/4563.org\/?p=124396"},"modified":"2020-06-26T18:07:40","modified_gmt":"2020-06-26T10:07:40","slug":"elasticsearch-%e6%90%9c%e7%b4%a2%e7%9a%84%e6%97%b6%e5%80%99%e6%80%8e%e4%b9%88%e8%ae%be%e7%bd%ae%e5%af%b9%e6%90%9c%e7%b4%a2%e8%af%8d%e4%b8%8d%e8%bf%9b%e8%a1%8c%e5%88%86%e8%af%8d","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=124396","title":{"rendered":"elasticsearch \u641c\u7d22\u7684\u65f6\u5019\u600e\u4e48\u8bbe\u7f6e\u5bf9\u641c\u7d22\u8bcd\u4e0d\u8fdb\u884c\u5206\u8bcd"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  elasticsearch \u641c\u7d22\u7684\u65f6\u5019\u600e\u4e48\u8bbe\u7f6e\u5bf9\u641c\u7d22\u8bcd\u4e0d\u8fdb\u884c\u5206\u8bcd               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ThanksSirAlex <\/span>  <span><i><\/i> 12<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u7528\u4e86_analyze \u63a5\u53e3\uff0c\u53d1\u73b0\u67e5\u8be2\u6f6e\u6d41\u7684\u65f6\u5019\u4f1a\u8fd9\u6837<\/p>\n<pre><code>{   \"tokens\": [     {       \"token\": \"\u6f6e\",       \"start_offset\": 0,       \"end_offset\": 1,       \"type\": \"&lt;IDEOGRAPHIC&gt;\",       \"position\": 0     },     {       \"token\": \"\u6d41\",       \"start_offset\": 1,       \"end_offset\": 2,       \"type\": \"&lt;IDEOGRAPHIC&gt;\",       \"position\": 1     }   ] } <\/code><\/pre>\n<p>\u4f46\u662f\u6211\u4e0d\u5e0c\u671b\u4ed6\u5bf9\u641c\u7d22\u8bcd\u8fdb\u884c\u5206\u8bcd<\/p>\n<p>mapping \u662f\u8fd9\u6837\u7684<\/p>\n<pre><code>mappings: {                    product: {                      properties: {                        title:      { type: 'text', boost: 100, index: 'not_analyzed' }, # analyzer: 'ik_smart', index: 'not_analyzed'                        summary:    { type: 'text', boost: 10, index: 'not_analyzed' }, # analyzer: 'ik_smart', index: 'not_analyzed' },                        content:    { type: 'text', boost: 10, index: 'not_analyzed' }, # analyzer: 'ik_smart', index: 'not_analyzed' },                        class_name: { type: 'string', index: \"not_analyzed\" },                        tags:       { type: 'text', boost: 100, index: 'not_analyzed' }, # analyzer: 'ik_smart', index: 'not_analyzed' },                        date:       { type: 'date',  format: \"yyyy-MM-dd'T'HH:mm:ss.SSSZZ\"}                      }                    }                  } <\/code><\/pre>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>9<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"2094418\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sss495088732 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             type:&#8221;keyword&#8221;,\u65b0\u7248\u672c\u597d\u50cf\u6ca1\u6709 not_analyzed \u8fd9\u79cd\u8bf4\u6cd5\u4e86,\u4ec5 text \u7c7b\u578b\u652f\u6301\u5206\u8bcd                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2094419\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : ThanksSirAlex <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @sss495088732 \u8001\u9879\u76ee\u4e86\uff0c\u7528\u7684\u8fd8\u662f es5.5.3                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2094420\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : sss495088732 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ThanksSirAlex \u90a3\u5c31\u975e\u5e38\u50f5\u786c\u4e86 0.0                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2094421\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wupeaking <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u4ee5\u5728\u5efa\u7acb mapping \u65f6\u518d\u5355\u72ec\u4e3a\u8fd9\u4e2a\u5b57\u6bb5\u521b\u5efa\u4e00\u4e2a\u4e0d\u5206\u8bcd\u7684\u5c5e\u6027                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2094422\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zxc12300123 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             match_phrase                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2094423\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : ThanksSirAlex <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zxc12300123 \u7528\u4e86 match_phrase \u4e00\u6761\u7ed3\u679c\u90fd\u641c\u4e0d\u5230\u4e86\uff0c\u6709\u70b9\u61f5\u3002\u3002\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2094424\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : optional <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u521b\u5efa\u4e24\u4e2a\u5b57\u6bb5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2094425\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : misaka19000 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u770b ES \u6587\u6863                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"2094426\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : JRay <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5728\u641c\u7d22\u5b57\u6bb5\u7684\u65f6\u5019\uff0c\u5728\u5b57\u6bb5\u540d\u79f0\u540e\u9762\u52a0\u4e0a.keyword                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>elasticsearch \u641c\u7d22\u7684&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\/124396"}],"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=124396"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/124396\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=124396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=124396"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=124396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}