{"id":977,"date":"2020-06-22T23:28:51","date_gmt":"2020-06-22T14:28:51","guid":{"rendered":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=977"},"modified":"2020-07-10T19:58:46","modified_gmt":"2020-07-10T10:58:46","slug":"elasticsearch-template-%ea%b4%80%eb%a6%ac","status":"publish","type":"post","link":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=977","title":{"rendered":"Elasticsearch Template \uad00\ub9ac"},"content":{"rendered":"<h1>Elasticsearch Template \uad00\ub9ac<\/h1>\n<p>\ud15c\ud50c\ub9bf\uc744 \uc0dd\uc131\ud574 \ub193\uc73c\uba74 \uc0c8\ub85c \uc0dd\uc131\ub418\ub294 \uc778\ub371\uc2a4\uc5d0 \uc124\uc815\uc744 \ubbf8\ub9ac \uc9c0\uc815\ud574 \ub193\uc9c0 \uc54a\uc544\ub3c4 \uc790\ub3d9\uc73c\ub85c \ud15c\ud50c\ub9bf\uc774 \uc801\uc6a9\ub429\ub2c8\ub2e4.<\/p>\n<h2>\uad8c\uc7a5\uc0ac\ud56d<\/h2>\n<ul>\n<li>Index Template \uc744 \uc0ac\uc6a9\ud558\ub77c : Index\ub97c \ucd94\uac00\ud560 \ub54c \uae30\ubcf8\uc801\uc73c\ub85c \uc801\uc6a9\ub420 \ud15c\ud50c\ub9bf\uc744 \ub9cc\ub4e4\uc5b4\ub77c.<\/li>\n<li>\ubaa8\ub4e0 \uc2e0\uaddc \ud15c\ud50c\ub9bf\uc5d0 \uc801\uc6a9\ub420 \ub514\ud3f4\ud2b8 \ud15c\ud50c\ub9bf\uc744 \ub9cc\ub4e4\uc5b4\ub77c : \uc989 \uae00\ub85c\ubc8c \uc138\ud305\uc744 \ud1b5\ud574 \uc2e0\uaddc\ub85c \ucd94\uac00\ub418\ub294 \ud15c\ud50c\ub9bf\uc5d0 \ubc18\ub4dc\uc2dc \uc801\uc6a9\ub418\ub3c4\ub85d \ud558\ub77c.<\/li>\n<\/ul>\n<h2>\uc0dd\uc131\ub418\uc5b4 \uc788\ub294 \ud15c\ud50c\ub9bf \ud655\uc778<\/h2>\n<pre><code class=\"language-bash\">curl -XGET http:\/\/localhost:9200\/_cat\/templates<\/code><\/pre>\n<h2>\uc0dd\uc131\ub418\uc5b4 \uc788\ub294 \ud15c\ud50c\ub9bf \ub0b4\uc6a9\ud655\uc778<\/h2>\n<pre><code class=\"language-bash\">curl -XGET http:\/\/localhost:9200\/_cat\/templates\/template_web<\/code><\/pre>\n<h2>\ud15c\ud50c\ub9bf \uc0dd\uc131<\/h2>\n<p><code>keyword<\/code> \uc640 <code>text<\/code> \uc758 \ucc28\uc774\uc810\uc740 <code>keyword<\/code> \ub294 \ud615\ud0dc\uc18c\ubd84\uc11d\uc744 \ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\ub610\ud55c, \ub300\uc18c\ubb38\uc790\ub97c \uad6c\ubd84\ud569\ub2c8\ub2e4. \ub370\uc774\ud0c0\uac00 <code>Kate<\/code> \ub85c \uc785\ub825\ub418\uc5b4 \uc788\uc73c\uba74 <code>kate<\/code> \ub85c \uac80\uc0c9\ud560 \uacbd\uc6b0 \uac80\uc0c9\uc774 \ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">curl -XPUT http:\/\/localhost:9200\/_template\/template_web?pretty \\\n     -H &#039;Content-Type: application\/json; charset=utf-8&#039; \\\n     -d &#039;{\n  &quot;aliases&quot;: {},\n  &quot;index_patterns&quot;: [\n    &quot;weblog-one-*&quot;,\n    &quot;moblog-one-*&quot;,\n    &quot;scmlog-one-*&quot;,\n    &quot;scm2log-one-*&quot;\n  ],\n  &quot;mappings&quot;: {\n    &quot;doc&quot;: {\n      &quot;_all&quot;: {\n        &quot;enabled&quot;: false\n      },\n      &quot;properties&quot;: {\n        &quot;geoip&quot;: {\n          &quot;type&quot;: &quot;object&quot;,\n          &quot;dynamic&quot;: true,\n          &quot;properties&quot;: {\n            &quot;location&quot;: {\n              &quot;type&quot;: &quot;geo_point&quot;\n            },\n            &quot;ip&quot;: {\n              &quot;type&quot;: &quot;ip&quot;\n            },\n            &quot;country_name&quot;: {\n              &quot;type&quot;: &quot;keyword&quot;\n            },\n            &quot;continent_code&quot;: {\n              &quot;type&quot;: &quot;keyword&quot;\n            }\n          }\n        },\n        &quot;@version&quot;: {\n          &quot;type&quot;: &quot;keyword&quot;\n        }\n      },\n      &quot;dynamic_templates&quot;: [\n        {\n          &quot;message_field&quot;: {\n            &quot;mapping&quot;: {\n              &quot;type&quot;: &quot;text&quot;,\n              &quot;norms&quot;: false\n            },\n            &quot;match&quot;: &quot;message&quot;,\n            &quot;match_mapping_type&quot;: &quot;string&quot;\n          }\n        },\n        {\n          &quot;string_fields&quot;: {\n            &quot;mapping&quot;: {\n              &quot;type&quot;: &quot;text&quot;,\n              &quot;norms&quot;: false,\n              &quot;fields&quot;: {\n                &quot;raw&quot;: {\n                  &quot;ignore_above&quot;: 256,\n                  &quot;type&quot;: &quot;keyword&quot;\n                }\n              }\n            },\n            &quot;match&quot;: &quot;*&quot;,\n            &quot;match_mapping_type&quot;: &quot;string&quot;\n          }\n        }\n      ]\n    }\n  },\n  &quot;order&quot;: 200,\n  &quot;settings&quot;: {\n    &quot;index&quot;: {\n      &quot;number_of_replicas&quot;: &quot;1&quot;,\n      &quot;number_of_shards&quot;: &quot;1&quot;,\n      &quot;refresh_interval&quot;: &quot;5s&quot;\n    }\n  }\n}&#039;<\/code><\/pre>\n<h2>\ud15c\ud50c\ub9bf \uc0ad\uc81c<\/h2>\n<pre><code class=\"language-bash\">curl -XDELETE http:\/\/localhost:9200\/_template\/template_web?pretty<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Elasticsearch Template \uad00\ub9ac \ud15c\ud50c\ub9bf\uc744 \uc0dd\uc131\ud574 \ub193\uc73c\uba74 \uc0c8\ub85c \uc0dd\uc131\ub418\ub294 \uc778\ub371\uc2a4\uc5d0 \uc124\uc815\uc744 \ubbf8\ub9ac \uc9c0\uc815\ud574 \ub193\uc9c0 \uc54a\uc544\ub3c4 \uc790\ub3d9\uc73c\ub85c \ud15c\ud50c\ub9bf\uc774 \uc801\uc6a9\ub429\ub2c8\ub2e4. \uad8c\uc7a5\uc0ac\ud56d Index Template \uc744 \uc0ac\uc6a9\ud558\ub77c : Index\ub97c \ucd94\uac00\ud560 \ub54c \uae30\ubcf8\uc801\uc73c\ub85c \uc801\uc6a9\ub420 \ud15c\ud50c\ub9bf\uc744 \ub9cc\ub4e4\uc5b4\ub77c. \ubaa8\ub4e0 \uc2e0\uaddc \ud15c\ud50c\ub9bf\uc5d0 \uc801\uc6a9\ub420 \ub514\ud3f4\ud2b8 \ud15c\ud50c\ub9bf\uc744 \ub9cc\ub4e4\uc5b4\ub77c : \uc989 \uae00\ub85c\ubc8c \uc138\ud305\uc744 \ud1b5\ud574 \uc2e0\uaddc\ub85c \ucd94\uac00\ub418\ub294 \ud15c\ud50c\ub9bf\uc5d0 \ubc18\ub4dc\uc2dc \uc801\uc6a9\ub418\ub3c4\ub85d \ud558\ub77c. \uc0dd\uc131\ub418\uc5b4 \uc788\ub294 \ud15c\ud50c\ub9bf \ud655\uc778 curl -XGET http:\/\/localhost:9200\/_cat\/templates\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=977\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-977","post","type-post","status-publish","format-standard","hentry","category-elasticsearch"],"_links":{"self":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/977","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=977"}],"version-history":[{"count":8,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/977\/revisions"}],"predecessor-version":[{"id":1158,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/977\/revisions\/1158"}],"wp:attachment":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=977"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=977"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=977"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}