{"id":227075,"date":"2014-06-25T13:31:02","date_gmt":"2014-06-25T09:31:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=227075"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=227075","title":{"rendered":"<span class=\"post_title\">\u0418\u043c\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u0433\u0435\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 OpenGeoDB \u0432 Elasticsearch<\/span>"},"content":{"rendered":"<div class=\"content html_format\">       \u0417\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u043b\u0438 \u0432\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c, \u043d\u0430\u0439\u0434\u044f \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u0443\u044e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0451 \u0432 \u0441\u0432\u043e\u0451 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u043d\u0438\u0431\u0443\u0434\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043f\u0443\u0441\u0442\u044c \u0434\u0430\u0436\u0435 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e? \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u0434\u0430! \u042d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u0442 \u043a\u0430\u043a, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Logstash \u0434\u043b\u044f \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 Kibana \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 Elasticsearch \u0442\u0430\u043a, \u0447\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430\u0445 \u043d\u0430 \u0436\u0438\u0432\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/5b6\/dc0\/338\/5b6dc0338cf6a59112d772fd791b1fcb.png\"\/><a name=\"habracut\"><\/a><\/p>\n<h1>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435<\/h1>\n<p>\u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u0438\u0437 \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f Elasticsearch \u0438 Logstash. \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"http:\/\/www.elasticsearch.org\/blog\/elasticsearch-1-1-0-released\/\">Elasticsearch 1.1.0<\/a> \u0438 <a href=\"http:\/\/www.elasticsearch.org\/blog\/logstash-1-4-0-ga-unleashed\/\">Logstash 1.4.0<\/a> \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445.<\/p>\n<p>  <a href=\"http:\/\/opengeodb.org\/wiki\/OpenGeoDB\">OpenGeoDB<\/a> \u2014 \u044d\u0442\u043e \u043d\u0435\u043c\u0435\u0446\u043a\u0438\u0439 \u0441\u0430\u0439\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0433\u0435\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0413\u0435\u0440\u043c\u0430\u043d\u0438\u0438 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445 SQL \u0438 CSV. \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Elasticsearch \u0442\u043e SQL \u043d\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 CSV. \u041e\u0434\u043d\u0430\u043a\u043e, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u044d\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Logstash \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Elasticsearch. \u0424\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0433\u043e\u0440\u043e\u0434\u043e\u0432 \u0413\u0435\u0440\u043c\u0430\u043d\u0438\u0438, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0432\u0441\u0435 \u0438\u0445 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b. \u042d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0434\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0441 \u0441\u0430\u0439\u0442\u0430 <a href=\"http:\/\/fa-technik.adfc.de\/code\/opengeodb\/DE.tab\">OpenGeoDB<\/a> (\u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0444\u0430\u0439\u043b) \u043f\u043e\u0434 \u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 <a href=\"http:\/\/opengeodb.org\/wiki\/OpenGeoDB_Lizenz\">public domain<\/a>.<\/p>\n<h1>\u0424\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u043d\u043d\u044b\u0445<\/h1>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u0432 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0447\u0442\u043e, \u043e\u043d\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u0438\u0437 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043a\u043e\u043b\u043e\u043d\u043e\u043a:<\/p>\n<ul>\n<li><b>loc_id:<\/b> \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 (\u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u0430\u0437\u044b)<\/li>\n<li><b>ags:<\/b> \u0433\u043e\u0441\u0443\u0434\u0430\u0440\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u0434<\/li>\n<li><b>ascii:<\/b> \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u043d\u044b\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438<\/li>\n<li><b>name:<\/b> \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438<\/li>\n<li><b>lat:<\/b> \u0448\u0438\u0440\u043e\u0442\u0430 (\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b)<\/li>\n<li><b>lon:<\/b> \u0434\u043e\u043b\u0433\u043e\u0442\u0430 (\u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b)<\/li>\n<li><b>amt:<\/b> \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f<\/li>\n<li><b>plz:<\/b> \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 (\u0435\u0441\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0433\u043e, \u0442\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u0430\u043f\u044f\u0442\u043e\u0439)<\/li>\n<li><b>vorwahl:<\/b> \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u0434<\/li>\n<li><b>einwohner:<\/b> \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u044f<\/li>\n<li><b>flaeche:<\/b> \u043f\u043b\u043e\u0449\u0430\u0434\u044c<\/li>\n<li><b>kz:<\/b> \u0441\u0435\u0440\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u043a\u0430<\/li>\n<li><b>typ:<\/b> \u0442\u0438\u043f \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0435\u0434\u0438\u043d\u0438\u0446\u044b<\/li>\n<li><b>level:<\/b> \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0432 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438<\/li>\n<li><b>of:<\/b> \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0447\u0430\u0441\u0442\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u044d\u0442\u0430 \u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u044c<\/li>\n<li><b>invalid:<\/b> \u043a\u043e\u043b\u043e\u043d\u043a\u0430 \u043d\u0435\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u0430<\/li>\n<\/ul>\n<p>  \u041d\u0430\u043c \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b \u043f\u043e\u043b\u044f <i>name, lat, lon, area, population \u0438 license tag<\/i>. \u041c\u044b \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u043d\u0438\u043c \u0432\u0441\u043a\u043e\u0440\u0435\u2026<\/p>\n<h1>\u0418\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 Elasticsearch<\/h1>\n<p>  <\/p>\n<h2>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c csv \u0444\u0438\u043b\u044c\u0442\u0440 logstash<\/h2>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Elasticsearch. \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c Logstash. \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u043d\u0438\u0436\u0435 \u0432 \u0444\u0430\u0439\u043b opengeodb.conf. \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e \u0447\u0442\u043e \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0438\u043b\u044c\u0442\u0440 \u00abcsv\u00bb(comma-separated values), \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e \u0447\u0442\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u044f, \u0430 \u043d\u0435 \u0437\u0430\u043f\u044f\u0442\u0430\u044f.<\/p>\n<pre><code class=\"bash\">input {     stdin {} }  filter {   # Step 1, possible dropping   if [message] =~ \/^#\/ {     drop {}   }    # Step 2, splitting   csv {     # careful... there is a &quot;tab&quot; embedded in the next line:     # if you cannot copy paste it, press ctrl+V and then the tab key to create the control sequence     # or maybe just tab, depending on your editor     separator =&gt; '      '     quote_char =&gt; '|' # arbitrary, default one is included in the data and does not work     columns =&gt; [ 'id', 'ags', 'name_uc', 'name', 'lat', 'lon', 'official_description', 'zip', 'phone_area_code', 'population', 'area', 'plate', 'type', 'level', 'of', 'invalid' ]   }    # Step 3, possible dropping   if [level] != '6' {     drop {}   }    # Step 4, zip code splitting   if [zip] =~ \/,\/ {     mutate {       split =&gt; [ &quot;zip&quot;, &quot;,&quot; ]     }   }    # Step 5, lat\/lon love   if [lat] and [lon] {     # move into own location object for additional geo_point type in ES     # copy field, then merge to create array for bettermap     mutate {       rename =&gt; [ &quot;lat&quot;, &quot;[location][lat]&quot;, &quot;lon&quot;, &quot;[location][lon]&quot; ]       add_field =&gt; { &quot;lonlat&quot; =&gt; [ &quot;%{[location][lon]}&quot;, &quot;%{[location][lat]}&quot; ] }     }   }    # Step 6, explicit conversion   mutate {     convert =&gt; [ &quot;population&quot;, &quot;integer&quot; ]     convert =&gt; [ &quot;area&quot;, &quot;integer&quot; ]     convert =&gt; [ &quot;[location][lat]&quot;, &quot;float&quot; ]     convert =&gt; [ &quot;[location][lon]&quot;, &quot;float&quot; ]     convert =&gt; [ &quot;[lonlat]&quot;, &quot;float&quot; ]   } }  output {   elasticsearch {     host =&gt; 'localhost'     index =&gt; 'opengeodb'     index_type =&gt; &quot;locality&quot;     flush_size =&gt; 1000     protocol =&gt; 'http'   } } <\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c, \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0432\u043e\u0442 \u0442\u0430\u043a \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c Logstash \u0434\u043b\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. Elasticsearch \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0437\u0430\u043f\u0443\u0449\u0435\u043d.<\/p>\n<pre><code class=\"bash\">cat DE.tab | logstash-1.4.0\/bin\/logstash -f opengeodb.conf <\/code><\/pre>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e \u0432\u0441\u0435\u0433\u043e (\u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u044f\u0442\u044c \u043c\u0438\u043d\u0443\u0442\u0443 \u0438\u043b\u0438 \u0431\u043e\u043b\u0435\u0435, \u0432\u0441\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f). \u041f\u0435\u0440\u0432\u043e\u0435 \u043d\u0430 \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u044d\u0442\u043e \u0442\u043e \u0447\u0442\u043e \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 Logstash \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0432\u043e\u0434 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439 \u00abfile\u00bb. \u042d\u0442\u043e \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0432\u0432\u043e\u0434\u0430 \u0432\u0435\u0434\u0435\u0442 \u0441\u0435\u0431\u044f \u043a\u0430\u043a \u00abtail -f\u00bb \u0432 UNIX \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445, \u0442\u043e \u0435\u0441\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0444\u0430\u0439\u043b. \u041d\u0430\u0448 \u0444\u0430\u0439\u043b \u043d\u0430\u043f\u0440\u043e\u0442\u0438\u0432 \u0438\u043c\u0435\u0435\u0442 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440, \u0442\u0430\u043a \u0447\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0437\u0443\u043c\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u0435\u0433\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0432\u043e\u0434\u0430 \u00abstdin\u00bb.<\/p>\n<p>  \u0421\u0435\u043a\u0446\u0438\u044f \u00abfilter\u00bb \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0448\u0435\u0441\u0442\u0438 \u0448\u0430\u0433\u043e\u0432. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438\u0445 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0438 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u043c \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043d\u0438\u0445.<\/p>\n<h3>\u0448\u0430\u0433 1 \u2014 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438<\/h3>\n<p>\u041d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u0448\u0430\u0433\u0435 \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u0441\u044f \u043e\u0442 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432. \u0418\u0445 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0443 \u0440\u0435\u0448\u0435\u0442\u043a\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438. \u042d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0432 \u043d\u0430\u0448\u0435\u043c \u0444\u0430\u0439\u043b\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u043c\u0435\u043d\u0430 \u043a\u043e\u043b\u043e\u043d\u043e\u043a. \u0418\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e.<\/p>\n<h3>\u0448\u0430\u0433 2 \u2014 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u043c csv<\/h3>\n<p>\u0412\u0442\u043e\u0440\u043e\u0439 \u0448\u0430\u0433 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u0441\u044e \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e \u0440\u0430\u0437\u0431\u043e\u0440\u0443 CSV. \u0412\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u00abseparator\u00bb (\u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c) \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u00abtab\u00bb (\u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u044f), \u00abquote_char\u00bb \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043e\u0434\u043d\u0430 \u043a\u0430\u0432\u044b\u0447\u043a\u0430 &quot;, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u0445 \u043d\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c. \u0421\u0432\u043e\u0439\u0441\u0442\u0432\u043e \u00abcolumns\u00bb \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0438\u043c\u0435\u043d\u0430 \u043a\u043e\u043b\u043e\u043d\u043e\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u043f\u043e\u0437\u0436\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d \u043f\u043e\u043b\u0435\u0439.<\/p>\n<blockquote><p><b>\u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435!<\/b> \u041f\u0440\u0438 \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u0430 \u043e\u0442\u0441\u044e\u0434\u0430 \u0432\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b \u00abseparator\u00bb, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d \u043a\u0430\u043a \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u043e\u0432. \u0415\u0441\u043b\u0438 \u0441\u043a\u0440\u0438\u043f\u0442 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u044d\u0442\u043e \u0432 \u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c.<\/p><\/blockquote>\n<p>  <\/p>\n<h3>\u0448\u0430\u0433 3 \u2014 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438<\/h3>\n<p>\u041d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0438\u0441\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0433\u043e\u0440\u043e\u0434\u0430\u0445 (\u0442\u0435 \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u043e\u043b\u0435 \u00ablevel\u00bb \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 6). \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c.<\/p>\n<h3>\u0448\u0430\u0433 4 \u2014 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441<\/h3>\n<p>\u0427\u0435\u0442\u0432\u0435\u0440\u0442\u044b\u0439 \u0448\u0430\u0433 \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430. \u0415\u0441\u043b\u0438 \u0443 \u0437\u0430\u043f\u0438\u0441\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u0447\u0442\u043e\u0432\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0430 (\u043a\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0433\u043e\u0440\u043e\u0434\u0430\u0445), \u0442\u043e \u043e\u043d\u0438 \u0432\u0441\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u043e\u043b\u0435, \u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u044b \u0437\u0430\u043f\u044f\u0442\u044b\u043c\u0438. \u0427\u0442\u043e\u0431\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0445 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0430 \u043d\u0435 \u043e\u0434\u043d\u043e\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0438\u043b\u044c\u0442\u0440 \u00abmutate\u00bb \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044f. \u0412\u043e\u0442, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0447\u0438\u0441\u0435\u043b \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0443 \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439.<\/p>\n<h3>\u0448\u0430\u0433 5 \u2014 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0433\u0435\u043e \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p>\u041f\u044f\u0442\u044b\u0439 \u0448\u0430\u0433 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442 \u0433\u0435\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435. \u041f\u0440\u0438 \u0447\u0442\u0435\u043d\u0438\u0438 \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 DE.dat \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f lat \u0438 lon. \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u043c\u044b\u0441\u043b \u0432 \u044d\u0442\u0438\u0445 \u043f\u043e\u043b\u044f\u0445 \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435. \u042d\u0442\u043e\u0442 \u0448\u0430\u0433 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043e\u0431\u0430 \u043f\u043e\u043b\u044f \u0432 \u0434\u0432\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u0434\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043a\u0430\u043a \u0442\u0438\u043f Elasticsearch <a href=\"http:\/\/www.elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/mapping-geo-point-type.html\">geo_point<\/a> \u0438 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043a\u0430\u043a \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 { \u00ablocation\u00bb: { \u00ablat\u00bb: x, \u00ablon\u00bb: y }}. \u0414\u0440\u0443\u0433\u0430\u044f \u0436\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u0430\u0441\u0441\u0438\u0432 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u043e\u043b\u0433\u043e\u0442\u0443 (longitude) \u0438 \u0448\u0438\u0440\u043e\u0442\u0443 (latitude) (\u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u0442\u0430\u043a\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435!). \u0422\u0430\u043a \u0447\u0442\u043e \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Kibana bettermap \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b.<\/p>\n<h3>\u0448\u0430\u0433 6 \u2014 \u044f\u0432\u043d\u043e\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u043a \u0442\u0438\u043f\u0443<\/h3>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0448\u0430\u0433 \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u044f\u0432\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u043e\u043b\u044f\u043c. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c Elasticsearch \u0441\u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u043d\u0438\u043c\u0438 \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c.<\/p>\n<p>  \u0421\u0435\u043a\u0446\u0438\u044f \u00aboutput\u00bb \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 Logtash \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 1.4, \u0442\u0430\u043a \u0447\u0442\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0432\u0435\u0440\u0441\u0438\u044f \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435. \u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u00abelasticsearch_http\u00bb. \u0417\u0430\u0431\u0435\u0433\u0430\u044f \u0432\u043f\u0435\u0440\u0435\u0434 \u0441\u043a\u0430\u0436\u0443 \u0447\u0442\u043e \u0442\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0432\u044b\u0432\u043e\u0434 \u00abelasticsearch\u00bb \u0438 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u044c protocol =&gt; http \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c HTTP \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0440\u0442 9200 \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0441 Elasticsearch.<\/p>\n<p>  <\/p>\n<h1>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Kibana \u0438 Elasticsearch \u0434\u043b\u044f \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445<\/h1>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Kibana \u0434\u043b\u044f \u0438\u0445 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0438\u0434\u0436\u0435\u0442 bettermap \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u0440\u043e\u0434\u0435 population:[10000 TO *] \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0433\u043e\u0440\u043e\u0434 \u0432 \u0413\u0435\u0440\u043c\u0430\u043d\u0438\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/5b6\/dc0\/338\/5b6dc0338cf6a59112d772fd791b1fcb.png\"\/><\/p>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0446\u0435\u043b\u0435\u0439:<\/p>\n<ul>\n<li>\u041d\u0430\u0439\u0442\u0438 \u0433\u043e\u0440\u043e\u0434\u0430 \u0441 \u043d\u0430\u0438\u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u0435\u043c<\/li>\n<li>\u041d\u0430\u0439\u0442\u0438 \u0433\u043e\u0440\u043e\u0434\u0430 \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0431\u0449\u0430\u044f \u0441\u0435\u0440\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u043d\u043e\u043c\u0435\u0440\u043d\u044b\u0445 \u0437\u043d\u0430\u043a\u043e\u0432 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, GT \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 G\u00fctersloh \u0438 \u043e\u043a\u0440\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u044f\u0445)<\/li>\n<li>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441\u043a\u0440\u0438\u043f\u0442 \u0430\u0433\u0433\u0440\u0435\u0433\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u0435\u0439 \u0441 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043b\u043e\u0442\u043d\u044b\u043c \u0438\u043b\u0438 \u0440\u0435\u0434\u043a\u0438\u043c \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u043d\u0430 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u044b\u0439 \u043a\u0438\u043b\u043e\u043c\u0435\u0442\u0440. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u044d\u0442\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0432 Logstash.<\/li>\n<\/ul>\n<p>  \u0412\u0441\u0451 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u043e \u044d\u0442\u043e \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043d\u0430\u043c \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. We need to go deeper.<\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u041e\u0442\u0432\u043b\u0435\u0447\u0435\u043c\u0441\u044f \u043d\u0430 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a\u0438\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0448\u0442\u0443\u043a\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0433\u043e\u0440\u043e\u0434\u0430, \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b\u2026 \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0432 \u0432\u0435\u0431 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445 \u0433\u0434\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435.<\/p>\n<p>  \u0425\u043e\u0440\u043e\u0448\u0438\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043a\u0443\u043f\u043a\u0438. \u041d\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0432\u043b\u0430\u0434\u0435\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043c\u0430\u0433\u0430\u0437\u0438\u043d \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u043a\u0430\u0437\u044b \u0447\u0430\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u044b\u0435 \u0438\u043b\u0438 \u0432\u043e\u0432\u0441\u0435 \u0437\u0430\u043a\u0430\u0437 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0431\u0435\u0437 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0443\u043c\u0435\u0441\u0442\u043d\u043e \u043f\u043e\u043c\u043e\u0447\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0443\u0441\u043a\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0430\u0437\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u00ab\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u043c\u00bb \u0431\u043e\u043d\u0443\u0441\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043f\u043e\u0442\u0435\u0440\u0438 \u0437\u0430\u043a\u0430\u0437\u0430 \u0438\u043b\u0438 \u043e\u0442\u043c\u0435\u043d\u044b \u0438\u0437\u0437\u0430 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043e\u0444\u043e\u0440\u043c\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0430\u0437\u0430.<\/p>\n<p>  Elasticsearch \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0443 \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u00abcompletion suggester\u00bb. \u041d\u043e \u0443 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u0435\u0441\u0442\u044c \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a. \u0412\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043b\u0435\u0433\u043a\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0432\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u0434 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0435\u0439, \u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0443 \u043d\u0430\u0441 \u0438 \u0435\u0441\u0442\u044c Logstash. \u0427\u0442\u043e\u0431\u044b \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 <a href=\"http:\/\/www.elasticsearch.org\/blog\/you-complete-me\/\">\u00abcompletion suggester\u00bb<\/a>(\u0430\u043d\u0433\u043b).<\/p>\n<h2>\u041f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438<\/h2>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043c\u043e\u0447\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432\u0432\u0435\u0441\u0442\u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0433\u043e\u0440\u043e\u0434\u0430 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u043d \u0438\u043b\u0438 \u043e\u043d\u0430 \u0436\u0438\u0432\u0435\u0442. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043b\u0435\u0433\u0447\u0435 \u043d\u0430\u0439\u0442\u0438 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u043a \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c\u0443 \u0433\u043e\u0440\u043e\u0434\u0443. \u0422\u0430\u043a\u0436\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u0441\u043f\u0435\u0440\u0432\u0430 \u0434\u0430\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432\u0432\u0435\u0441\u0442\u0438 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441, \u0430 \u0442\u043e\u0433\u0434\u0430 \u0443\u0436\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0433\u043e\u0440\u043e\u0434\u0435.<\/p>\n<p>  \u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u043d\u0435\u0441\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e Logstash, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0438\u043b\u044c\u0442\u0440\u0430. \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u044d\u0442\u043e\u0442 \u043e\u0442\u0440\u044b\u0432\u043e\u043a \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432 \u0432\u0430\u0448 opengeodb.conf, \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0448\u0430\u0433\u0430 5 \u0438 \u043f\u0435\u0440\u0435\u0434 \u0448\u0430\u0433\u043e\u043c 6.<\/p>\n<pre><code class=\"bash\">  # Step 5 and a half   # create a prefix completion field data structure   # input can be any of the zips or the name field   # weight is the population, so big cities are preferred when the city name is entered   mutate {     add_field =&gt; [ &quot;[suggest][input]&quot;, &quot;%{name}&quot; ]     add_field =&gt; [ &quot;[suggest][output]&quot;, &quot;%{name}&quot; ]     add_field =&gt; [ &quot;[suggest][payload][name]&quot;, &quot;%{name}&quot; ]     add_field =&gt; [ &quot;[suggest][weight]&quot;, &quot;%{population}&quot; ]   }   # add all the zips to the input as well   mutate {     merge =&gt; [ &quot;[suggest][input]&quot;, zip ]     convert =&gt; [ &quot;[suggest][weight]&quot;, &quot;integer&quot; ]   }   # ruby filter to put an array into the event   ruby {     code =&gt; 'event[&quot;[suggest][payload][data]&quot;] = event[&quot;zip&quot;]'   } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c Logstash \u0437\u0430\u043f\u0438\u0448\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0439 \u0441 \u00abcompletion suggester\u00bb, \u043a\u043e\u0433\u0434\u0430 \u0432\u043d\u043e\u0432\u044c \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u043f\u043e\u043b\u0435\u0439, \u0447\u0442\u043e\u0431\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u0431\u044b\u043b\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0438 \u0432 Elaticsearch. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0430\u043c \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 Logstash \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 output &gt; elastichsearch.<\/p>\n<pre><code class=\"bash\"># change the output to this in order to include an index template output {   elasticsearch {     host =&gt; 'localhost'     index =&gt; 'opengeodb'     index_type =&gt; &quot;locality&quot;     flush_size =&gt; 1000     protocol =&gt; 'http'     template_name =&gt; 'opengeodb'     template =&gt; '\/path\/to\/opengeodb-template.json'   } } <\/code><\/pre>\n<p>  \u042d\u0442\u043e\u0442 \u0448\u0430\u0431\u043b\u043e\u043d \u043e\u0447\u0435\u043d\u044c \u0441\u0445\u043e\u0436 \u0441 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u043c Logstash \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u043d\u043e \u0432 \u043d\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u043f\u043e\u043b\u044f suggest \u0438 geo_point<\/p>\n<pre><code class=\"javascript\">{   &quot;template&quot; : &quot;opengeodb&quot;,   &quot;settings&quot; : {     &quot;index.refresh_interval&quot; : &quot;5s&quot;   },   &quot;mappings&quot; : {     &quot;_default_&quot; : {        &quot;_all&quot; : {&quot;enabled&quot; : true},        &quot;dynamic_templates&quot; : [ {          &quot;string_fields&quot; : {            &quot;match&quot; : &quot;*&quot;,            &quot;match_mapping_type&quot; : &quot;string&quot;,            &quot;mapping&quot; : {              &quot;type&quot; : &quot;string&quot;,              &quot;index&quot; : &quot;analyzed&quot;,              &quot;omit_norms&quot; : true,              &quot;fields&quot; : {                &quot;raw&quot; : {&quot;type&quot;: &quot;string&quot;, &quot;index&quot; : &quot;not_analyzed&quot;, &quot;ignore_above&quot; : 256}              }            }          }        } ],        &quot;properties&quot; : {          &quot;@version&quot;: { &quot;type&quot;: &quot;string&quot;, &quot;index&quot;: &quot;not_analyzed&quot; },          &quot;location&quot; : { &quot;type&quot; : &quot;geo_point&quot; },          &quot;suggest&quot; : { &quot;type&quot;: &quot;completion&quot;, &quot;payloads&quot; : true, &quot;analyzer&quot; : &quot;whitespace&quot; }        }     }   } } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0441\u0442\u0430\u0440\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0438\u043d\u0434\u0435\u043a\u0441) \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044e<\/p>\n<pre><code class=\"bash\">curl -X DELETE localhost:9200\/opengeodb cat DE.tab | logstash-1.4.0\/bin\/logstash -f opengeodb.conf <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u00ab\u0441\u0430\u0436\u0436\u0435\u0441\u0442\u0435\u0440\u0443\u00bb<\/p>\n<pre><code class=\"bash\">curl -X GET 'localhost:9200\/opengeodb\/_suggest?pretty' -d '{   &quot;places&quot; : {     &quot;text&quot; : &quot;B&quot;,     &quot;completion&quot; : {       &quot;field&quot; : &quot;suggest&quot;     }   } }' <\/code><\/pre>\n<p>  \u0410 \u0432\u043e\u0442 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"javascript\">{   &quot;_shards&quot; : {     &quot;total&quot; : 5,     &quot;successful&quot; : 5,     &quot;failed&quot; : 0   },   &quot;places&quot; : [ {     &quot;text&quot; : &quot;B&quot;,     &quot;offset&quot; : 0,     &quot;length&quot; : 1,     &quot;options&quot; : [ {       &quot;text&quot; : &quot;Berlin&quot;,       &quot;score&quot; : 3431675.0, &quot;payload&quot; : {&quot;data&quot;:[&quot;Berlin&quot;,&quot;10115&quot;,&quot;10117&quot;,&quot;10119&quot;,&quot;10178&quot;,&quot;10179&quot;,&quot;10243&quot;,&quot;10245&quot;,&quot;10247&quot;,&quot;10249&quot;,&quot;10315&quot;,&quot;10317&quot;,&quot;10318&quot;,&quot;10319&quot;,&quot;10365&quot;,&quot;10367&quot;,&quot;10369&quot;,&quot;10405&quot;,&quot;10407&quot;,&quot;10409&quot;,&quot;10435&quot;,&quot;10437&quot;,&quot;10439&quot;,&quot;10551&quot;,&quot;10553&quot;,&quot;10555&quot;,&quot;10557&quot;,&quot;10559&quot;,&quot;10585&quot;,&quot;10587&quot;,&quot;10589&quot;,&quot;10623&quot;,&quot;10625&quot;,&quot;10627&quot;,&quot;10629&quot;,&quot;10707&quot;,&quot;10709&quot;,&quot;10711&quot;,&quot;10713&quot;,&quot;10715&quot;,&quot;10717&quot;,&quot;10719&quot;,&quot;10777&quot;,&quot;10779&quot;,&quot;10781&quot;,&quot;10783&quot;,&quot;10785&quot;,&quot;10787&quot;,&quot;10789&quot;,&quot;10823&quot;,&quot;10825&quot;,&quot;10827&quot;,&quot;10829&quot;,&quot;10961&quot;,&quot;10963&quot;,&quot;10965&quot;,&quot;10967&quot;,&quot;10969&quot;,&quot;10997&quot;,&quot;10999&quot;,&quot;12043&quot;,&quot;12045&quot;,&quot;12047&quot;,&quot;12049&quot;,&quot;12051&quot;,&quot;12053&quot;,&quot;12055&quot;,&quot;12057&quot;,&quot;12059&quot;,&quot;12099&quot;,&quot;12101&quot;,&quot;12103&quot;,&quot;12105&quot;,&quot;12107&quot;,&quot;12109&quot;,&quot;12157&quot;,&quot;12159&quot;,&quot;12161&quot;,&quot;12163&quot;,&quot;12165&quot;,&quot;12167&quot;,&quot;12169&quot;,&quot;12203&quot;,&quot;12205&quot;,&quot;12207&quot;,&quot;12209&quot;,&quot;12247&quot;,&quot;12249&quot;,&quot;12277&quot;,&quot;12279&quot;,&quot;12305&quot;,&quot;12307&quot;,&quot;12309&quot;,&quot;12347&quot;,&quot;12349&quot;,&quot;12351&quot;,&quot;12353&quot;,&quot;12355&quot;,&quot;12357&quot;,&quot;12359&quot;,&quot;12435&quot;,&quot;12437&quot;,&quot;12439&quot;,&quot;12459&quot;,&quot;12487&quot;,&quot;12489&quot;,&quot;12524&quot;,&quot;12526&quot;,&quot;12527&quot;,&quot;12529&quot;,&quot;12555&quot;,&quot;12557&quot;,&quot;12559&quot;,&quot;12587&quot;,&quot;12589&quot;,&quot;12619&quot;,&quot;12621&quot;,&quot;12623&quot;,&quot;12627&quot;,&quot;12629&quot;,&quot;12679&quot;,&quot;12681&quot;,&quot;12683&quot;,&quot;12685&quot;,&quot;12687&quot;,&quot;12689&quot;,&quot;13051&quot;,&quot;13053&quot;,&quot;13055&quot;,&quot;13057&quot;,&quot;13059&quot;,&quot;13086&quot;,&quot;13088&quot;,&quot;13089&quot;,&quot;13125&quot;,&quot;13127&quot;,&quot;13129&quot;,&quot;13156&quot;,&quot;13158&quot;,&quot;13159&quot;,&quot;13187&quot;,&quot;13189&quot;,&quot;13347&quot;,&quot;13349&quot;,&quot;13351&quot;,&quot;13353&quot;,&quot;13355&quot;,&quot;13357&quot;,&quot;13359&quot;,&quot;13403&quot;,&quot;13405&quot;,&quot;13407&quot;,&quot;13409&quot;,&quot;13435&quot;,&quot;13437&quot;,&quot;13439&quot;,&quot;13442&quot;,&quot;13465&quot;,&quot;13467&quot;,&quot;13469&quot;,&quot;13503&quot;,&quot;13505&quot;,&quot;13507&quot;,&quot;13509&quot;,&quot;13581&quot;,&quot;13583&quot;,&quot;13585&quot;,&quot;13587&quot;,&quot;13589&quot;,&quot;13591&quot;,&quot;13593&quot;,&quot;13595&quot;,&quot;13597&quot;,&quot;13599&quot;,&quot;13627&quot;,&quot;13629&quot;,&quot;14050&quot;,&quot;14052&quot;,&quot;14053&quot;,&quot;14055&quot;,&quot;14057&quot;,&quot;14059&quot;,&quot;14089&quot;,&quot;14109&quot;,&quot;14129&quot;,&quot;14163&quot;,&quot;14165&quot;,&quot;14167&quot;,&quot;14169&quot;,&quot;14193&quot;,&quot;14195&quot;,&quot;14197&quot;,&quot;14199&quot;]}     }, {       &quot;text&quot; : &quot;Bremen&quot;,       &quot;score&quot; : 545932.0, &quot;payload&quot; : {&quot;data&quot;:[&quot;Bremen&quot;,&quot;28195&quot;,&quot;28203&quot;,&quot;28205&quot;,&quot;28207&quot;,&quot;28209&quot;,&quot;28211&quot;,&quot;28213&quot;,&quot;28215&quot;,&quot;28217&quot;,&quot;28219&quot;,&quot;28237&quot;,&quot;28239&quot;,&quot;28307&quot;,&quot;28309&quot;,&quot;28325&quot;,&quot;28327&quot;,&quot;28329&quot;,&quot;28355&quot;,&quot;28357&quot;,&quot;28359&quot;,&quot;28717&quot;,&quot;28719&quot;,&quot;28755&quot;,&quot;28757&quot;,&quot;28759&quot;,&quot;28777&quot;,&quot;28779&quot;,&quot;28197&quot;,&quot;28199&quot;,&quot;28201&quot;,&quot;28259&quot;,&quot;28277&quot;,&quot;28279&quot;]}     }, {       &quot;text&quot; : &quot;Bochum&quot;,       &quot;score&quot; : 388179.0, &quot;payload&quot; : {&quot;data&quot;:[&quot;Bochum&quot;,&quot;44787&quot;,&quot;44789&quot;,&quot;44791&quot;,&quot;44793&quot;,&quot;44795&quot;,&quot;44797&quot;,&quot;44799&quot;,&quot;44801&quot;,&quot;44803&quot;,&quot;44805&quot;,&quot;44807&quot;,&quot;44809&quot;,&quot;44866&quot;,&quot;44867&quot;,&quot;44869&quot;,&quot;44879&quot;,&quot;44892&quot;,&quot;44894&quot;]}     }, {       &quot;text&quot; : &quot;Bielefeld&quot;,       &quot;score&quot; : 328012.0, &quot;payload&quot; : {&quot;data&quot;:[&quot;Bielefeld&quot;,&quot;33602&quot;,&quot;33604&quot;,&quot;33605&quot;,&quot;33607&quot;,&quot;33609&quot;,&quot;33611&quot;,&quot;33613&quot;,&quot;33615&quot;,&quot;33617&quot;,&quot;33619&quot;,&quot;33647&quot;,&quot;33649&quot;,&quot;33659&quot;,&quot;33689&quot;,&quot;33699&quot;,&quot;33719&quot;,&quot;33729&quot;,&quot;33739&quot;]}     }, {       &quot;text&quot; : &quot;Bonn&quot;,       &quot;score&quot; : 311938.0, &quot;payload&quot; : {&quot;data&quot;:[&quot;Bonn&quot;,&quot;53111&quot;,&quot;53113&quot;,&quot;53115&quot;,&quot;53117&quot;,&quot;53119&quot;,&quot;53121&quot;,&quot;53123&quot;,&quot;53125&quot;,&quot;53127&quot;,&quot;53129&quot;,&quot;53173&quot;,&quot;53175&quot;,&quot;53177&quot;,&quot;53179&quot;,&quot;53225&quot;,&quot;53227&quot;,&quot;53229&quot;]}     } ]   } ] } <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u0435 \u0433\u043e\u0440\u043e\u0434\u0430 \u043a\u0430\u043a \u0435\u0433\u043e \u0432\u0435\u0441. \u0411\u043e\u043b\u044c\u0448\u0438\u0435 \u0433\u043e\u0440\u043e\u0434\u0430 \u0431\u0443\u0434\u0443\u0442 \u0432 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0435 \u0432\u044b\u0448\u0435 \u0447\u0435\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435 \u0433\u043e\u0440\u043e\u0434\u0430. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0433\u043e\u0440\u043e\u0434\u0430 \u0438 \u0432\u0441\u0435 \u0435\u0433\u043e \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0444\u043e\u0440\u043c\u044b (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u043d\u0430\u0439\u0434\u0435\u043d \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441).<\/p>\n<p>  \u0418 \u044d\u0442\u043e \u0432\u0441\u0435 \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f! \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0431\u0430\u0437 \u0434\u0430\u043d\u043d\u044b\u0445. \u042f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0443\u0432\u0435\u0440\u0435\u043d \u0447\u0442\u043e \u0433\u0434\u0435-\u0442\u043e, \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0432\u0430\u0448\u0435\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438, \u043a\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0443\u0436\u0435 \u0441\u043e\u0431\u0440\u0430\u043b \u043f\u043e\u043b\u0435\u0437\u043d\u0435\u0448\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438 \u0436\u0434\u0443\u0442 \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u044b\u043c\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445. \u0421\u043f\u0440\u043e\u0441\u0438\u0442\u0435 \u0441\u0432\u043e\u0438\u0445 \u043a\u043e\u043b\u0435\u0433. \u0412\u044b \u043d\u0430\u0439\u0434\u0435\u0442\u0435 \u0442\u0430\u043a\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438.<\/p>\n<h1>\u041e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430<\/h1>\n<p>\u042d\u0442\u043e \u043c\u043e\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u0435\u043d \u0432\u0441\u0435\u043c, \u043a\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0435\u0433\u043e \u0438 \u0443\u043a\u0430\u0436\u0435\u0442 \u043d\u0430 \u043c\u043e\u0438 \u043e\u0448\u0438\u0431\u043a\u0438. <br \/>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e.<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/227075\/\"> http:\/\/habrahabr.ru\/post\/227075\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">       \u0417\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u043b\u0438 \u0432\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c, \u043d\u0430\u0439\u0434\u044f \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u0443\u044e \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u0443\u044e \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u0430\u043a \u0445\u043e\u0440\u043e\u0448\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0435\u0451 \u0432 \u0441\u0432\u043e\u0451 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u0443\u044e-\u043d\u0438\u0431\u0443\u0434\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u043f\u0443\u0441\u0442\u044c \u0434\u0430\u0436\u0435 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e? \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435 \u0434\u0430! \u042d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u0442 \u043a\u0430\u043a, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Logstash \u0434\u043b\u044f \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043d\u0430\u0431\u043e\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442, \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 Kibana \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 Elasticsearch \u0442\u0430\u043a, \u0447\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u043f\u0440\u0438 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430\u0445 \u043d\u0430 \u0436\u0438\u0432\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/5b6\/dc0\/338\/5b6dc0338cf6a59112d772fd791b1fcb.png\"\/><\/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-227075","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/227075","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=227075"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/227075\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=227075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=227075"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=227075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}