{"id":369564,"date":"2024-05-21T04:06:19","date_gmt":"2024-05-21T04:06:19","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=369564"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T04:06:19","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=369564","title":{"rendered":"<span>\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Elasticdump \u0441 Manticore<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/00a\/1c5\/bfc\/00a1c5bfcafd73e6d5d0c8df9f061984.png\" width=\"3600\" height=\"1884\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/00a\/1c5\/bfc\/00a1c5bfcafd73e6d5d0c8df9f061984.png\"\/><\/figure>\n<p><a href=\"https:\/\/github.com\/elasticsearch-dump\/elasticsearch-dump\" rel=\"noopener noreferrer nofollow\">Elasticdump<\/a> &#8212; \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 Elasticsearch.  \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u044b, \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b JSON, \u0430 \u0437\u0430\u0442\u0435\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044f \u0438\u0445 \u0432 \u0434\u0440\u0443\u0433\u043e\u0435 \u043c\u0435\u0441\u0442\u043e. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0439 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0430\u043c\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d).<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Elasticdump \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0432\u0430\u0448\u0438\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 Elasticsearch \u0432 Manticore.<\/p>\n<blockquote>\n<p> \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u00a0development \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0430\u00a0\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 (27\u00a0\u0444\u0435\u0432\u0440\u0430\u043b\u044f 2024\u00a0\u0433\u043e\u0434\u0430). \u0412\u043e\u0442<a href=\"https:\/\/mnt.cr\/dev\/nightly\" rel=\"noopener noreferrer nofollow\"> \u0442\u0430\u043a<\/a>\u00a0\u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c dev \u043f\u0430\u043a\u0435\u0442\u044b.<\/p>\n<\/blockquote>\n<h3>\u0418\u043c\u043f\u043e\u0440\u0442 \u0441\u0445\u0435\u043c\u044b \u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 Elasticsearch \u0432 Manticore \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438,  \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>elasticdump --input=http:\/\/localhost:9200\/your_elasticsearch_index  --output=http:\/\/localhost:9308\/your_manticore_table --type=data<\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0412\u043e\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 Elasticsearch \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>test<\/code> \u0441 \u0442\u0430\u043a\u043e\u0439 \u0441\u0445\u0435\u043c\u043e\u0439:<\/p>\n<pre><code># curl -sX GET localhost:9200\/test\/_mapping  {   \"test\": {     \"mappings\": {   \"properties\": {       \"price\": {           \"type\": \"float\"       },       \"title\": {           \"type\": \"text\"       }   }     }   } } <\/code><\/pre>\n<p>\u0438 300 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0432 \u043d\u0435\u043c:<\/p>\n<pre><code># curl -sX GET localhost:9200\/test\/_count  {   \"count\": 300,   \"_shards\": { \"total\": 1, \"successful\": 1, \"skipped\": 0, \"failed\": 0   } }  <\/code><\/pre>\n<p>\u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u0432 Manticore \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446:<\/p>\n<pre><code># curl -sX GET localhost:9308\/cli -d 'SHOW TABLES'  Empty set (0.000 sec)<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c Elasticdump:<\/p>\n<pre><code># elasticdump --input=http:\/\/localhost:9200\/test --output=http:\/\/localhost:9308\/test_imported --type=data  Tue, 26 Feb 2024 16:18:52 GMT | starting dump (node:156) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created) Tue, 26 Feb 2024 16:18:52 GMT | got 300 objects from source elasticsearch (offset: 0) Tue, 26 Feb 2024 16:18:52 GMT | sent 300 objects to destination elasticsearch, wrote 300 Tue, 26 Feb 2024 16:18:52 GMT | got 0 objects from source elasticsearch (offset: 300) Tue, 26 Feb 2024 16:18:52 GMT | Total Writes: 300 Tue, 26 Feb 2024 16:18:52 GMT | dump complete<\/code><\/pre>\n<p>\u0418 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438:<\/p>\n<pre><code># curl -sX GET localhost:9308\/cli -d 'DESC test_imported'  +-------+--------+----------------+ | Field | Type   | Properties     | +-------+--------+----------------+ | id| bigint |                | | title | text   | indexed stored | | price | float  |                | +-------+--------+----------------+ 3 rows in set (0.000 sec)<\/code><\/pre>\n<pre><code># curl -sX GET localhost:9308\/cli -d 'SELECT COUNT(*) FROM test_imported'  +----------+ | count(*) | +----------+ | 300      | +----------+ 1 row in set (0.000 sec)<\/code><\/pre>\n<p>\u041c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0430.<\/p>\n<h3>\u0418\u043c\u043f\u043e\u0440\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0445\u0435\u043c\u044b<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0445\u0435\u043c\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435:<\/p>\n<pre><code># elasticdump --input=http:\/\/localhost:9200\/your_elasticsearch_index --output=http:\/\/localhost:9308\/your_manticore_table --type=mapping<\/code><\/pre>\n<p>\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043d\u043e\u0432\u0443\u044e \u043f\u0443\u0441\u0442\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 Manticore \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0438\u0437 \u0443\u0437\u043b\u0430 Elasticsearch.<\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u043e\u0440\u0442\u044b Elasticsearch \u0438 Manticore \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: <code>localhost:9200<\/code> \u0438 <code>localhost:9308<\/code> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0445\u043e\u0441\u0442\u044b\/\u043f\u043e\u0440\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a Elasticsearch \u0438\u043b\u0438 Manticore, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0430\u0448\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0439\u0442\u0435 \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043e Manticore \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 Elasticsearch \u0432 \u0441\u0432\u043e\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435:<\/p>\n<ul>\n<li>\n<p><code>aggregate_metric<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>binary<\/code> => <code>string<\/code><\/p>\n<\/li>\n<li>\n<p><code>boolean<\/code> => <code>bool<\/code><\/p>\n<\/li>\n<li>\n<p><code>byte<\/code> => <code>int<\/code><\/p>\n<\/li>\n<li>\n<p><code>completion<\/code> => <code>string<\/code><\/p>\n<\/li>\n<li>\n<p><code>date<\/code> => <code>timestamp<\/code><\/p>\n<\/li>\n<li>\n<p><code>date_nanos<\/code> => <code>bigint<\/code><\/p>\n<\/li>\n<li>\n<p><code>date_range<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>dense_vector<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>flattened<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>float<\/code> => <code>float<\/code><\/p>\n<\/li>\n<li>\n<p><code>float_range<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>geo_point<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>geo_shape<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>half_float<\/code> => <code>float<\/code><\/p>\n<\/li>\n<li>\n<p><code>histogram<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>integer<\/code> => <code>int<\/code><\/p>\n<\/li>\n<li>\n<p><code>integer_range<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>ip<\/code> => <code>string<\/code><\/p>\n<\/li>\n<li>\n<p><code>ip_range<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>keyword<\/code> => <code>string<\/code><\/p>\n<\/li>\n<li>\n<p><code>long<\/code> => <code>bigint<\/code><\/p>\n<\/li>\n<li>\n<p><code>long_range<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>match_only_text<\/code> => <code>text<\/code><\/p>\n<\/li>\n<li>\n<p><code>object<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>point<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>scaled_float<\/code> => <code>float<\/code><\/p>\n<\/li>\n<li>\n<p><code>search_as_you_type<\/code> => <code>text<\/code><\/p>\n<\/li>\n<li>\n<p><code>shape<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>short<\/code> => <code>int<\/code><\/p>\n<\/li>\n<li>\n<p><code>text<\/code> => <code>text<\/code><\/p>\n<\/li>\n<li>\n<p><code>unsigned_long<\/code> => <code>int<\/code><\/p>\n<\/li>\n<li>\n<p><code>version<\/code> => <code>string<\/code><\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0435 \u0438\u043d\u0434\u0435\u043a\u0441 Elasticsearch \u0441 \u0442\u0430\u043a\u043e\u0439 \u0441\u0445\u0435\u043c\u043e\u0439: <\/p>\n<\/li>\n<\/ul>\n<pre><code>{  \"test\": {    \"mappings\": {      \"properties\": {        \"location\": {          \"type\": \"geo_point\"        },        \"title\": {          \"type\": \"text\"        }      }    }  } }<\/code><\/pre>\n<p>, \u0442\u043e \u0432 Manticore \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u0441\u0445\u0435\u043c\u0443:<\/p>\n<pre><code>sql +----------+--------+----------------+ | Field    | Type   | Properties     | +----------+--------+----------------+ | id       | bigint |                | | title    | text   | indexed stored | | location | json   |                | +----------+--------+----------------+<\/code><\/pre>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0418\u0442\u0430\u043a, \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 Manticore \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 Elasticdump, \u0443\u043f\u0440\u043e\u0449\u0430\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 Elasticsearch \u043d\u0430 Manticore. \u042d\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0431\u0435\u0437 \u0442\u0440\u0443\u0434\u0430 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0441\u0445\u0435\u043c\u0443. \u042d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u043b\u044e\u0441 \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 Manticore \u0431\u0435\u0437 \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/797055\/\"> https:\/\/habr.com\/ru\/articles\/797055\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p><a href=\"https:\/\/github.com\/elasticsearch-dump\/elasticsearch-dump\" rel=\"noopener noreferrer nofollow\">Elasticdump<\/a> &#8212; \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 Elasticsearch.  \u041e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0442\u044c \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u044b, \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b JSON, \u0430 \u0437\u0430\u0442\u0435\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u044f \u0438\u0445 \u0432 \u0434\u0440\u0443\u0433\u043e\u0435 \u043c\u0435\u0441\u0442\u043e. \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0434\u043b\u044f \u0446\u0435\u043b\u0435\u0439 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u0441\u0440\u0435\u0434\u0430\u043c\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0437 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d).<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Elasticdump \u0434\u043b\u044f \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u0432\u0430\u0448\u0438\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432 Elasticsearch \u0432 Manticore.<\/p>\n<blockquote>\n<p> \u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u00a0development \u0432\u0435\u0440\u0441\u0438\u0438 \u043d\u0430\u00a0\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 (27\u00a0\u0444\u0435\u0432\u0440\u0430\u043b\u044f 2024\u00a0\u0433\u043e\u0434\u0430). \u0412\u043e\u0442<a href=\"https:\/\/mnt.cr\/dev\/nightly\" rel=\"noopener noreferrer nofollow\"> \u0442\u0430\u043a<\/a>\u00a0\u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c dev \u043f\u0430\u043a\u0435\u0442\u044b.<\/p>\n<\/blockquote>\n<h3>\u0418\u043c\u043f\u043e\u0440\u0442 \u0441\u0445\u0435\u043c\u044b \u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 Elasticsearch \u0432 Manticore \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438,  \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>elasticdump --input=http:\/\/localhost:9200\/your_elasticsearch_index  --output=http:\/\/localhost:9308\/your_manticore_table --type=data<\/code><\/pre>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0412\u043e\u0442 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 Elasticsearch \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <code>test<\/code> \u0441 \u0442\u0430\u043a\u043e\u0439 \u0441\u0445\u0435\u043c\u043e\u0439:<\/p>\n<pre><code># curl -sX GET localhost:9200\/test\/_mapping  {   \"test\": {     \"mappings\": {   \"properties\": {       \"price\": {           \"type\": \"float\"       },       \"title\": {           \"type\": \"text\"       }   }     }   } } <\/code><\/pre>\n<p>\u0438 300 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0432 \u043d\u0435\u043c:<\/p>\n<pre><code># curl -sX GET localhost:9200\/test\/_count  {   \"count\": 300,   \"_shards\": { \"total\": 1, \"successful\": 1, \"skipped\": 0, \"failed\": 0   } }  <\/code><\/pre>\n<p>\u041f\u043e\u043a\u0430 \u0447\u0442\u043e \u0432 Manticore \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446:<\/p>\n<pre><code># curl -sX GET localhost:9308\/cli -d 'SHOW TABLES'  Empty set (0.000 sec)<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c Elasticdump:<\/p>\n<pre><code># elasticdump --input=http:\/\/localhost:9200\/test --output=http:\/\/localhost:9308\/test_imported --type=data  Tue, 26 Feb 2024 16:18:52 GMT | starting dump (node:156) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead. (Use `node --trace-deprecation ...` to show where the warning was created) Tue, 26 Feb 2024 16:18:52 GMT | got 300 objects from source elasticsearch (offset: 0) Tue, 26 Feb 2024 16:18:52 GMT | sent 300 objects to destination elasticsearch, wrote 300 Tue, 26 Feb 2024 16:18:52 GMT | got 0 objects from source elasticsearch (offset: 300) Tue, 26 Feb 2024 16:18:52 GMT | Total Writes: 300 Tue, 26 Feb 2024 16:18:52 GMT | dump complete<\/code><\/pre>\n<p>\u0418 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438:<\/p>\n<pre><code># curl -sX GET localhost:9308\/cli -d 'DESC test_imported'  +-------+--------+----------------+ | Field | Type   | Properties     | +-------+--------+----------------+ | id| bigint |                | | title | text   | indexed stored | | price | float  |                | +-------+--------+----------------+ 3 rows in set (0.000 sec)<\/code><\/pre>\n<pre><code># curl -sX GET localhost:9308\/cli -d 'SELECT COUNT(*) FROM test_imported'  +----------+ | count(*) | +----------+ | 300      | +----------+ 1 row in set (0.000 sec)<\/code><\/pre>\n<p>\u041c\u044b \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0430.<\/p>\n<h3>\u0418\u043c\u043f\u043e\u0440\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0445\u0435\u043c\u044b<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0445\u0435\u043c\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435:<\/p>\n<pre><code># elasticdump --input=http:\/\/localhost:9200\/your_elasticsearch_index --output=http:\/\/localhost:9308\/your_manticore_table --type=mapping<\/code><\/pre>\n<p>\u0412\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043d\u043e\u0432\u0443\u044e \u043f\u0443\u0441\u0442\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 Manticore \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439, \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0438\u0437 \u0443\u0437\u043b\u0430 Elasticsearch.<\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u043e\u0440\u0442\u044b Elasticsearch \u0438 Manticore \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e: <code>localhost:9200<\/code> \u0438 <code>localhost:9308<\/code> \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u0415\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0445\u043e\u0441\u0442\u044b\/\u043f\u043e\u0440\u0442\u044b \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a Elasticsearch \u0438\u043b\u0438 Manticore, \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u0430\u0448\u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0443.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u0439\u0442\u0435 \u0432 \u0432\u0438\u0434\u0443, \u0447\u0442\u043e Manticore \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 Elasticsearch \u0432 \u0441\u0432\u043e\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435, \u0435\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435:<\/p>\n<ul>\n<li>\n<p><code>aggregate_metric<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>binary<\/code> => <code>string<\/code><\/p>\n<\/li>\n<li>\n<p><code>boolean<\/code> => <code>bool<\/code><\/p>\n<\/li>\n<li>\n<p><code>byte<\/code> => <code>int<\/code><\/p>\n<\/li>\n<li>\n<p><code>completion<\/code> => <code>string<\/code><\/p>\n<\/li>\n<li>\n<p><code>date<\/code> => <code>timestamp<\/code><\/p>\n<\/li>\n<li>\n<p><code>date_nanos<\/code> => <code>bigint<\/code><\/p>\n<\/li>\n<li>\n<p><code>date_range<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>dense_vector<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>flattened<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>float<\/code> => <code>float<\/code><\/p>\n<\/li>\n<li>\n<p><code>float_range<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>geo_point<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>geo_shape<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>half_float<\/code> => <code>float<\/code><\/p>\n<\/li>\n<li>\n<p><code>histogram<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>integer<\/code> => <code>int<\/code><\/p>\n<\/li>\n<li>\n<p><code>integer_range<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>ip<\/code> => <code>string<\/code><\/p>\n<\/li>\n<li>\n<p><code>ip_range<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>keyword<\/code> => <code>string<\/code><\/p>\n<\/li>\n<li>\n<p><code>long<\/code> => <code>bigint<\/code><\/p>\n<\/li>\n<li>\n<p><code>long_range<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>match_only_text<\/code> => <code>text<\/code><\/p>\n<\/li>\n<li>\n<p><code>object<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>point<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>scaled_float<\/code> => <code>float<\/code><\/p>\n<\/li>\n<li>\n<p><code>search_as_you_type<\/code> => <code>text<\/code><\/p>\n<\/li>\n<li>\n<p><code>shape<\/code> => <code>json<\/code><\/p>\n<\/li>\n<li>\n<p><code>short<\/code> => <code>int<\/code><\/p>\n<\/li>\n<li>\n<p><code>text<\/code> => <code>text<\/code><\/p>\n<\/li>\n<li>\n<p><code>unsigned_long<\/code> => <code>int<\/code><\/p>\n<\/li>\n<li>\n<p><code>version<\/code> => <code>string<\/code><\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442\u0435 \u0438\u043d\u0434\u0435\u043a\u0441 Elasticsearch \u0441 \u0442\u0430\u043a\u043e\u0439 \u0441\u0445\u0435\u043c\u043e\u0439: <\/p>\n<\/li>\n<\/ul>\n<pre><code>{  \"test\": {    \"mappings\": {      \"properties\": {        \"location\": {          \"type\": \"geo_point\"        },        \"title\": {          \"type\": \"text\"        }      }    }  } }<\/code><\/pre>\n<p>, \u0442\u043e \u0432 Manticore \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u0441\u0445\u0435\u043c\u0443:<\/p>\n<pre><code>sql +----------+--------+----------------+ | Field    | Type   | Properties     | +----------+--------+----------------+ | id       | bigint |                | | title    | text   | indexed stored | | location | json   |                | +----------+--------+----------------+<\/code><\/pre>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0418\u0442\u0430\u043a, \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 Manticore \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 Elasticdump, \u0443\u043f\u0440\u043e\u0449\u0430\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 Elasticsearch \u043d\u0430 Manticore. \u042d\u0442\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0431\u0435\u0437 \u0442\u0440\u0443\u0434\u0430 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0441\u0445\u0435\u043c\u0443. \u042d\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u043b\u044e\u0441 \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u0445\u043e\u0447\u0435\u0442 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043d\u0430 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 Manticore \u0431\u0435\u0437 \u0441\u043b\u043e\u0436\u043d\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/797055\/\"> https:\/\/habr.com\/ru\/articles\/797055\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-369564","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/369564","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=369564"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/369564\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=369564"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=369564"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=369564"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}