{"id":902,"date":"2020-06-19T00:55:47","date_gmt":"2020-06-18T15:55:47","guid":{"rendered":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=902"},"modified":"2020-06-22T23:48:19","modified_gmt":"2020-06-22T14:48:19","slug":"elasticsearch-6-x-%ed%95%9c%ea%b8%80-%ed%98%95%ed%83%9c%ec%86%8c%eb%b6%84%ec%84%9d%ea%b8%b0seunjeon-%ec%84%a4%ec%b9%98","status":"publish","type":"post","link":"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=902","title":{"rendered":"ElasticSearch 6.x \ud55c\uae00 \ud615\ud0dc\uc18c\ubd84\uc11d\uae30(seunjeon) \uc124\uce58"},"content":{"rendered":"<h1>ElasticSearch 6.x \ud55c\uae00 \ud615\ud0dc\uc18c\ubd84\uc11d\uae30(seunjeon) \uc124\uce58<\/h1>\n<p><strong>ES \ucd5c\uc2e0\ubc84\uc804\uc740 \uc124\uce58\uac00 \uc548\ub418\uace0 ES 6.1.4 \ub85c \uc124\uce58\ud574\uc57c \ud569\ub2c8\ub2e4.<\/strong><\/p>\n<p>\uc544\ub798 \uba85\ub839\uc73c\ub85c 6.4.3\uae4c\uc9c0\ub294 \uc791\ub3d9\ud558\ub294 \uac83\uc744 \ud655\uc778\ud588\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">sudo apt install elasticsearch=6.4.3\nsudo \/usr\/share\/elasticsearch\/bin\/elasticsearch-plugin install https:\/\/github.com\/javacafe-project\/elastic-book-etc\/raw\/master\/plugin\/elasticsearch-analysis-seunjeon-6.4.3.zip<\/code><\/pre>\n<h2>\uc65c seunjeon \uc778\uac00<\/h2>\n<p>\ucc98\uc74c\uc5d0 ES \uacf5\uc2dd\uc9c0\uc6d0 \ud615\ud0dc\uc18c\ubd84\uc11d\uae30\uc778 Nori \ub97c \uc0ac\uc6a9\ud560\uae4c \ud588\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uadf8\ub7f0\ub370, \uc2e4\uc81c \uc11c\ube44\uc2a4\ub85c \uc6b4\uc601\ud558\uae30 \uc704\ud574\uc11c\ub294 <code>AWS Elasticsearch Service<\/code> \ub97c \uc774\uc6a9\ud574\uc57c \ud560\uac74\ub370, <code>AWS ES<\/code> \uc5d0\uc11c\ub294 seunjeon \uc744 \uc9c0\uc6d0\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uadf8\ub798\uc11c <code>seunjeon<\/code> \uc73c\ub85c \ubcc0\uacbd\ud558\uac8c \ub418\uc5c8\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>JDK \uc124\uce58<\/h2>\n<p>JAVA 8 \uc774\uc0c1\uc758 \ubc84\uc804\uc744 \uc124\uce58\ud569\ub2c8\ub2e4. \uc124\uce58\ub418\uc5b4 \uc788\uc9c0 \uc54a\uc73c\uba74 <a href=\"\/wordpress\/?p=140\">\uc5ec\uae30<\/a> \ub97c \ucc38\uc870\ud574\uc11c \uc124\uce58\ud569\ub2c8\ub2e4.<\/p>\n<h2>gpg key \ucd94\uac00<\/h2>\n<pre><code class=\"language-bash\"># gpg key \ucd94\uac00\nwget -qO - https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch | sudo apt-key add -\n\n# ElasticSearch 6.x \ucd94\uac00\necho &quot;deb https:\/\/artifacts.elastic.co\/packages\/6.x\/apt stable main&quot; | sudo tee -a \/etc\/apt\/sources.list.d\/elastic-6.x.list\n\n# ElasticSearch 7.x \ucd94\uac00\n# echo &quot;deb https:\/\/artifacts.elastic.co\/packages\/7.x\/apt stable main&quot; | sudo tee -a \/etc\/apt\/sources.list.d\/elastic-7.x.list<\/code><\/pre>\n<h2>ElasticSearch \uc124\uce58<\/h2>\n<pre><code class=\"language-bash\">sudo apt update\nsudo apt install elasticsearch=6.1.4\nsudo systemctl start elasticsearch<\/code><\/pre>\n<p>\uc544\ub798 \uba85\ub839\uc73c\ub85c \uc815\uc0c1\uc791\ub3d9\uc744 \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">curl -XGET &#039;http:\/\/localhost:9200&#039;\n{\n  &quot;name&quot; : &quot;R4UHYUL&quot;,\n  &quot;cluster_name&quot; : &quot;elasticsearch&quot;,\n  &quot;cluster_uuid&quot; : &quot;56hmE2BkRnuG-4h401Zjow&quot;,\n  &quot;version&quot; : {\n    &quot;number&quot; : &quot;6.1.4&quot;,\n    &quot;build_hash&quot; : &quot;d838f2d&quot;,\n    &quot;build_date&quot; : &quot;2018-03-14T08:28:22.470Z&quot;,\n    &quot;build_snapshot&quot; : false,\n    &quot;lucene_version&quot; : &quot;7.1.0&quot;,\n    &quot;minimum_wire_compatibility_version&quot; : &quot;5.6.0&quot;,\n    &quot;minimum_index_compatibility_version&quot; : &quot;5.0.0&quot;\n  },\n  &quot;tagline&quot; : &quot;You Know, for Search&quot;\n}<\/code><\/pre>\n<p>\uc124\uc815\ud30c\uc77c\uacfc \ub85c\uadf8\ud30c\uc77c\uc758 \uc704\uce58\ub294 \uc544\ub798\uc640 \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">sudo ls -al \/etc\/elasticsearch\/\nsudo ls -al \/var\/log\/elasticsearch\/<\/code><\/pre>\n<h2>seunjeon \ud50c\ub7ec\uadf8\uc778 \uc124\uce58<\/h2>\n<p><code>seunjeon<\/code> \ud50c\ub7ec\uadf8\uc778\uc744 \uc124\uce58\ud569\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">sudo apt install zip unzip\nbash &lt;(curl -s https:\/\/bitbucket.org\/eunjeon\/seunjeon\/raw\/master\/elasticsearch\/scripts\/downloader.sh) -e 6.1.4 -p 6.1.1.1\nsudo \/usr\/share\/elasticsearch\/bin\/elasticsearch-plugin install file:\/\/`pwd`\/elasticsearch-analysis-seunjeon-6.1.1.1.zip\nsudo \/usr\/share\/elasticsearch\/bin\/elasticsearch-plugin list\n\n# \uc7ac\uc2dc\uc791\uc744 \ud574\uc57c \uc778\uc2dd\ud569\ub2c8\ub2e4.\nsudo systemctl restart elasticsearch\ncurl -XGET &#039;http:\/\/localhost:9200&#039;<\/code><\/pre>\n<p>\uc778\ub371\uc2a4\ub97c \uc0dd\uc131\ud558\uace0, \ud615\ud0dc\uc18c\ubd84\uc11d\uae30\ub85c <code>seunjeon<\/code> \uc744 \uc9c0\uc815\ud569\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">curl -XPUT http:\/\/localhost:9200\/korean_analyzer?pretty -H &#039;Content-Type: application\/json&#039; -d &#039;{\n  &quot;settings&quot; : {\n    &quot;index&quot;:{\n      &quot;analysis&quot;:{\n        &quot;analyzer&quot;:{\n          &quot;korean&quot;:{\n            &quot;type&quot;:&quot;custom&quot;,\n            &quot;tokenizer&quot;:&quot;seunjeon_default_tokenizer&quot;\n          }\n        },\n          &quot;tokenizer&quot;: {\n            &quot;seunjeon_default_tokenizer&quot;: {\n              &quot;index_eojeol&quot;: &quot;true&quot;,\n              &quot;index_poses&quot;: [\n                &quot;UNK&quot;, &quot;EP&quot;, &quot;I&quot;, &quot;J&quot;, &quot;M&quot;,\n                &quot;N&quot;, &quot;SL&quot;, &quot;SH&quot;, &quot;SN&quot;, &quot;VCP&quot;,\n                &quot;XP&quot;, &quot;XS&quot;, &quot;XR&quot;\n              ],\n              &quot;decompound&quot;: &quot;true&quot;,\n              &quot;type&quot;: &quot;seunjeon_tokenizer&quot;\n            }\n          }\n      }\n    }\n  },\n  &quot;mappings&quot;: {\n    &quot;_doc&quot; : {\n      &quot;properties&quot; : {\n        &quot;text&quot; : {\n          &quot;type&quot; : &quot;text&quot;,\n          &quot;analyzer&quot;: &quot;korean&quot;\n        }\n      }\n    }\n  }\n}&#039;<\/code><\/pre>\n<p>\uc815\uc0c1\uc801\uc73c\ub85c \uc791\ub3d9\ud558\ub294 \uac83\uc744 \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">curl -XPOST http:\/\/localhost:9200\/korean_analyzer\/_analyze?pretty -H &#039;Content-Type: application\/json&#039; -d &#039;{\n    &quot;analyzer&quot;:&quot;korean&quot;,\n    &quot;text&quot;:&quot;\uc544\ubc84\uc9c0\uac00\ubc29\uc5d0\ub4e4\uc5b4\uac00\uc2e0\ub2e4.&quot;\n}&#039;<\/code><\/pre>\n<h2>\uc0ac\uc6a9\uc790 \uc0ac\uc804 \ucd94\uac00<\/h2>\n<p>\uc0ac\uc6a9\uc790 \uc0ac\uc804\uc744 \ucd94\uac00\ud569\ub2c8\ub2e4.<\/p>\n<p><code>&quot;user_dict_path&quot;: &quot;user_dict.csv&quot;<\/code> \ud14c\uc2a4\ud2b8 \ud544\uc694!!<\/p>\n<pre><code class=\"language-bash\">curl -XDELETE http:\/\/localhost:9200\/korean_analyzer?pretty\n\ncurl -XPUT http:\/\/localhost:9200\/korean_analyzer?pretty -H &#039;Content-Type: application\/json&#039; -d &#039;{\n  &quot;settings&quot; : {\n    &quot;index&quot;:{\n      &quot;analysis&quot;:{\n        &quot;analyzer&quot;:{\n          &quot;korean&quot;:{\n            &quot;type&quot;:&quot;custom&quot;,\n            &quot;tokenizer&quot;:&quot;seunjeon_default_tokenizer&quot;\n          }\n        },\n          &quot;tokenizer&quot;: {\n            &quot;seunjeon_default_tokenizer&quot;: {\n              &quot;index_eojeol&quot;: &quot;true&quot;,\n              &quot;user_words&quot;: [\n                &quot;\ud150\ubc14\uc774\ud150&quot;, &quot;\uc5e0\ub514&quot;\n              ],\n              &quot;index_poses&quot;: [\n                &quot;UNK&quot;, &quot;EP&quot;, &quot;I&quot;, &quot;J&quot;, &quot;M&quot;,\n                &quot;N&quot;, &quot;SL&quot;, &quot;SH&quot;, &quot;SN&quot;, &quot;VCP&quot;,\n                &quot;XP&quot;, &quot;XS&quot;, &quot;XR&quot;\n              ],\n              &quot;decompound&quot;: &quot;true&quot;,\n              &quot;type&quot;: &quot;seunjeon_tokenizer&quot;\n            }\n          }\n      }\n    }\n  },\n  &quot;mappings&quot;: {\n    &quot;_doc&quot; : {\n      &quot;properties&quot; : {\n        &quot;text&quot; : {\n          &quot;type&quot; : &quot;text&quot;,\n          &quot;analyzer&quot;: &quot;korean&quot;\n        }\n      }\n    }\n  }\n}&#039;\n\ncurl -XPOST http:\/\/localhost:9200\/korean_analyzer\/_analyze?pretty -H &#039;Content-Type: application\/json&#039; -d &#039;{\n    &quot;analyzer&quot;:&quot;korean&quot;,\n    &quot;text&quot;:&quot;\ud150\ubc14\uc774\ud150 \uc5e0\ub514\uac00 \ucd94\ucc9c\ud569\ub2c8\ub2e4.&quot;\n}&#039;<\/code><\/pre>\n<h2>\ub3d9\uc758\uc5b4 \uc0ac\uc804 \ucd94\uac00<\/h2>\n<pre><code class=\"language-bash\">sudo vi \/etc\/elasticsearch\/synonyms.txt\n\ub178\ub808\ubc14,noreva,\ub178\ub798\ubc14\nairpods,\uc5d0\uc5b4\ud31f,airpod,airpot\n2080,\uc774\uacf5\ud314\uacf5<\/code><\/pre>\n<pre><code class=\"language-bash\">curl -XDELETE http:\/\/localhost:9200\/korean_analyzer?pretty\n\ncurl -XPUT http:\/\/localhost:9200\/korean_analyzer?pretty -H &#039;Content-Type: application\/json&#039; -d &#039;{\n  &quot;settings&quot; : {\n    &quot;index&quot;:{\n      &quot;analysis&quot;:{\n        &quot;analyzer&quot;:{\n          &quot;korean&quot;:{\n            &quot;type&quot;:&quot;custom&quot;,\n            &quot;tokenizer&quot;:&quot;seunjeon_default_tokenizer&quot;,\n            &quot;filter&quot; : [&quot;synonym&quot;]\n          }\n        },\n        &quot;filter&quot; : {\n          &quot;synonym&quot; : {\n            &quot;type&quot; : &quot;synonym&quot;,\n            &quot;synonyms_path&quot; : &quot;synonyms.txt&quot;\n          }\n        },\n        &quot;tokenizer&quot;: {\n          &quot;seunjeon_default_tokenizer&quot;: {\n            &quot;index_eojeol&quot;: &quot;true&quot;,\n            &quot;user_words&quot;: [\n              &quot;\ud150\ubc14\uc774\ud150&quot;, &quot;\uc5e0\ub514&quot;, &quot;\uc5d0\uc5b4\ud31f&quot;, &quot;\ub7ec\ube0c\ud50c\ub77c\ubcf4&quot;, &quot;\uc530\uc2a4\ud2f0\ucee4&quot;,\n              &quot;1+1&quot;\n            ],\n            &quot;index_poses&quot;: [\n                &quot;UNK&quot;, &quot;EP&quot;, &quot;I&quot;, &quot;J&quot;, &quot;M&quot;,\n                &quot;N&quot;, &quot;SL&quot;, &quot;SH&quot;, &quot;SN&quot;, &quot;VCP&quot;,\n                &quot;XP&quot;, &quot;XS&quot;, &quot;XR&quot;\n            ],\n            &quot;decompound&quot;: &quot;true&quot;,\n            &quot;type&quot;: &quot;seunjeon_tokenizer&quot;\n          }\n        }\n      }\n    }\n  },\n  &quot;mappings&quot;: {\n    &quot;_doc&quot; : {\n      &quot;properties&quot; : {\n        &quot;text&quot; : {\n          &quot;type&quot; : &quot;text&quot;,\n          &quot;analyzer&quot;: &quot;korean&quot;\n        }\n      }\n    }\n  }\n}&#039;\n\ncurl -XPOST http:\/\/localhost:9200\/korean_analyzer\/_analyze?pretty -H &#039;Content-Type: application\/json&#039; -d &#039;{\n    &quot;analyzer&quot;:&quot;korean&quot;,\n    &quot;text&quot;:&quot;airpod\uacfc \uc5d0\uc5b4\ud31f\uc740 \ub3d9\uc758\uc5b4\uc77c\uae4c?&quot;\n}&#039;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>ElasticSearch 6.x \ud55c\uae00 \ud615\ud0dc\uc18c\ubd84\uc11d\uae30(seunjeon) \uc124\uce58 ES \ucd5c\uc2e0\ubc84\uc804\uc740 \uc124\uce58\uac00 \uc548\ub418\uace0 ES 6.1.4 \ub85c \uc124\uce58\ud574\uc57c \ud569\ub2c8\ub2e4. \uc544\ub798 \uba85\ub839\uc73c\ub85c 6.4.3\uae4c\uc9c0\ub294 \uc791\ub3d9\ud558\ub294 \uac83\uc744 \ud655\uc778\ud588\uc2b5\ub2c8\ub2e4. sudo apt install elasticsearch=6.4.3 sudo \/usr\/share\/elasticsearch\/bin\/elasticsearch-plugin install https:\/\/github.com\/javacafe-project\/elastic-book-etc\/raw\/master\/plugin\/elasticsearch-analysis-seunjeon-6.4.3.zip \uc65c seunjeon \uc778\uac00 \ucc98\uc74c\uc5d0 ES \uacf5\uc2dd\uc9c0\uc6d0 \ud615\ud0dc\uc18c\ubd84\uc11d\uae30\uc778 Nori \ub97c \uc0ac\uc6a9\ud560\uae4c \ud588\uc2b5\ub2c8\ub2e4. \uadf8\ub7f0\ub370, \uc2e4\uc81c \uc11c\ube44\uc2a4\ub85c \uc6b4\uc601\ud558\uae30 \uc704\ud574\uc11c\ub294 AWS Elasticsearch Service \ub97c \uc774\uc6a9\ud574\uc57c \ud560\uac74\ub370, AWS ES \uc5d0\uc11c\ub294 seunjeon \uc744\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.skyer9.pe.kr\/wordpress\/?p=902\">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-902","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\/902","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=902"}],"version-history":[{"count":29,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/902\/revisions"}],"predecessor-version":[{"id":983,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/902\/revisions\/983"}],"wp:attachment":[{"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skyer9.pe.kr\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}