{"id":277253,"date":"2016-03-30T09:09:03","date_gmt":"2016-03-30T05:09:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=277253"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=277253","title":{"rendered":"\u041e\u0441\u043d\u043e\u0432\u044b Elasticsearch"},"content":{"rendered":"<p>       Elasticsearch \u2014 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0434\u0432\u0438\u0436\u043e\u043a \u0441 json rest api, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 Lucene \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 Java. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 \u044d\u0442\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043d\u0430 <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435<\/a>. \u0414\u0430\u043b\u0435\u0435 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c Elasticsearch \u043a\u0430\u043a ES.<br \/>  \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0434\u0432\u0438\u0436\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u043c \u043f\u043e\u0438\u0441\u043a\u0435 \u043f\u043e \u0431\u0430\u0437\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0438\u0441\u043a \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043c\u043e\u0440\u0444\u043e\u043b\u043e\u0433\u0438\u0438 \u044f\u0437\u044b\u043a\u0430 \u0438\u043b\u0438 \u043f\u043e\u0438\u0441\u043a \u043f\u043e geo \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c.<br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u0440\u043e \u043e\u0441\u043d\u043e\u0432\u044b ES \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u043f\u043e\u0441\u0442\u043e\u0432 \u0431\u043b\u043e\u0433\u0430. \u041f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c, \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0438\u0441\u043a\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b.<a name=\"habracut\"><\/a><br \/>  \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043e\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a ES \u044f \u0431\u0443\u0434\u0443 \u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e CURL. \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u0442\u044c \u043f\u043b\u0430\u0433\u0438\u043d \u0434\u043b\u044f google chrome \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/chrome.google.com\/webstore\/detail\/sense-beta\/lhjgkmllcaadmopgmanpapmpjgmfcfig?hl=ru\">sense<\/a>.<br \/>  \u041f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438. \u0412 \u043a\u043e\u043d\u0446\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u044b \u0441\u0441\u044b\u043b\u043a\u0438 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/glossary.html\">\u0433\u043b\u043e\u0441\u0441\u0430\u0440\u0438\u0438<\/a>.<\/p>\n<h1>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 ES<\/h1>\n<p>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f Java. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/setup.html#jvm-version\">\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442<\/a> \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u0438 Java \u043d\u043e\u0432\u0435\u0435, \u0447\u0435\u043c Java 8 update 20 \u0438\u043b\u0438 Java 7 update 55.<br \/>  \u0414\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 ES \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 <a href=\"https:\/\/www.elastic.co\/downloads\/elasticsearch\">\u0441\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430<\/a>. \u041f\u043e\u0441\u043b\u0435 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u0430\u0440\u0445\u0438\u0432\u0430 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c <code>bin\/elasticsearch<\/code>. \u0422\u0430\u043a\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/setup-repositories.html\">\u043f\u0430\u043a\u0435\u0442\u044b \u0434\u043b\u044f apt \u0438 yum<\/a>. \u0415\u0441\u0442\u044c <a href=\"https:\/\/hub.docker.com\/_\/elasticsearch\/\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 image \u0434\u043b\u044f docker<\/a>. <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/_installation.html\">\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435<\/a>.<br \/>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c:  <\/p>\n<pre><code class=\"bash\"># \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u043c \u0430\u0434\u0440\u0435\u0441 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e #export ES_URL=$(docker-machine ip dev):9200 export ES_URL=localhost:9200  curl -X GET $ES_URL<\/code><\/pre>\n<p>  \u041d\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442 \u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442:  <\/p>\n<pre><code>{   &quot;name&quot; : &quot;Heimdall&quot;,   &quot;cluster_name&quot; : &quot;elasticsearch&quot;,   &quot;version&quot; : {     &quot;number&quot; : &quot;2.2.1&quot;,     &quot;build_hash&quot; : &quot;d045fc29d1932bce18b2e65ab8b297fbf6cd41a1&quot;,     &quot;build_timestamp&quot; : &quot;2016-03-09T09:38:54Z&quot;,     &quot;build_snapshot&quot; : false,     &quot;lucene_version&quot; : &quot;5.4.1&quot;   },   &quot;tagline&quot; : &quot;You Know, for Search&quot; }<\/code><\/pre>\n<p>  <\/p>\n<h1>\u0418\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044f<\/h1>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u0441\u0442 \u0432 ES:  <\/p>\n<pre><code class=\"bash\"># \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 c id 1 \u0442\u0438\u043f\u0430 post \u0432 \u0438\u043d\u0434\u0435\u043a\u0441 blog. # ?pretty \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u044b\u0432\u043e\u0434 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e-\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u043c.  curl -XPUT &quot;$ES_URL\/blog\/post\/1?pretty&quot; -d' {   &quot;title&quot;: &quot;\u0412\u0435\u0441\u0435\u043b\u044b\u0435 \u043a\u043e\u0442\u044f\u0442\u0430&quot;,   &quot;content&quot;: &quot;&lt;p&gt;\u0421\u043c\u0435\u0448\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e \u043a\u043e\u0442\u044f\u0442&lt;p&gt;&quot;,   &quot;tags&quot;: [     &quot;\u043a\u043e\u0442\u044f\u0442\u0430&quot;,     &quot;\u0441\u043c\u0435\u0448\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f&quot;   ],   &quot;published_at&quot;: &quot;2014-09-12T20:44:42+00:00&quot; }' <\/code><\/pre>\n<p>  \u043e\u0442\u0432\u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430:  <\/p>\n<pre><code>{   &quot;_index&quot; : &quot;blog&quot;,   &quot;_type&quot; : &quot;post&quot;,   &quot;_id&quot; : &quot;1&quot;,   &quot;_version&quot; : 1,   &quot;_shards&quot; : {     &quot;total&quot; : 2,     &quot;successful&quot; : 1,     &quot;failed&quot; : 0   },   &quot;created&quot; : false } <\/code><\/pre>\n<p>  ES \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043b <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/glossary.html#glossary-index\">\u0438\u043d\u0434\u0435\u043a\u0441<\/a> blog \u0438 <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/glossary.html#glossary-type\">\u0442\u0438\u043f<\/a> post. \u041c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0443\u0441\u043b\u043e\u0432\u043d\u0443\u044e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u044e: \u0438\u043d\u0434\u0435\u043a\u0441 \u2014 \u044d\u0442\u043e \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u0430 \u0442\u0438\u043f \u2014 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u0432 \u044d\u0442\u043e\u0439 \u0411\u0414. \u041a\u0430\u0436\u0434\u044b\u0439 \u0442\u0438\u043f \u0438\u043c\u0435\u0435\u0442 \u0441\u0432\u043e\u044e \u0441\u0445\u0435\u043c\u0443 \u2014 <a href=\"http:\/\/www.elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/glossary.html#glossary-mapping\">mapping<\/a>, \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0438 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430. Mapping \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430:  <\/p>\n<pre><code class=\"bash\"># \u041f\u043e\u043b\u0443\u0447\u0438\u043c mapping \u0432\u0441\u0435\u0445 \u0442\u0438\u043f\u043e\u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 blog curl -XGET &quot;$ES_URL\/blog\/_mapping?pretty&quot;<\/code><\/pre>\n<p>  \u0412 \u043e\u0442\u0432\u0435\u0442\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430:  <\/p>\n<pre><code>{   &quot;blog&quot; : {     &quot;mappings&quot; : {       &quot;post&quot; : {         &quot;properties&quot; : {           \/* &quot;content&quot;: &quot;&lt;p&gt;\u0421\u043c\u0435\u0448\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e \u043a\u043e\u0442\u044f\u0442&lt;p&gt;&quot;, *\/            &quot;content&quot; : {             &quot;type&quot; : &quot;string&quot;           },           \/* &quot;published_at&quot;: &quot;2014-09-12T20:44:42+00:00&quot; *\/           &quot;published_at&quot; : {             &quot;type&quot; : &quot;date&quot;,             &quot;format&quot; : &quot;strict_date_optional_time||epoch_millis&quot;           },           \/* &quot;tags&quot;: [&quot;\u043a\u043e\u0442\u044f\u0442\u0430&quot;, &quot;\u0441\u043c\u0435\u0448\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f&quot;] *\/           &quot;tags&quot; : {             &quot;type&quot; : &quot;string&quot;           },           \/*  &quot;title&quot;: &quot;\u0412\u0435\u0441\u0435\u043b\u044b\u0435 \u043a\u043e\u0442\u044f\u0442\u0430&quot; *\/           &quot;title&quot; : {             &quot;type&quot; : &quot;string&quot;           }         }       }     }   } }<\/code><\/pre>\n<p>  \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e ES \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u043e\u0434\u0438\u043d\u043e\u0447\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043b\u0435 title \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u0430 \u043f\u043e\u043b\u0435 tags \u2014 \u043c\u0430\u0441\u0441\u0438\u0432 \u0441\u0442\u0440\u043e\u043a, \u0445\u043e\u0442\u044f \u043e\u043d\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 mapping \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e.<br \/>  \u041f\u043e\u0437\u0434\u043d\u0435\u0435 \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0435 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u043e.<\/p>\n<h1>\u0417\u0430\u043f\u0440\u043e\u0441\u044b<\/h1>\n<p>  <\/p>\n<h2>\u0418\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u043f\u043e \u0435\u0433\u043e id:<\/h2>\n<p>  <\/p>\n<pre><code class=\"bash\"># \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0441 id 1 \u0442\u0438\u043f\u0430 post \u0438\u0437 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 blog curl -XGET &quot;$ES_URL\/blog\/post\/1?pretty&quot;<\/code><\/pre>\n<p>  <\/p>\n<pre><code>{   &quot;_index&quot; : &quot;blog&quot;,   &quot;_type&quot; : &quot;post&quot;,   &quot;_id&quot; : &quot;1&quot;,   &quot;_version&quot; : 1,   &quot;found&quot; : true,   &quot;_source&quot; : {     &quot;title&quot; : &quot;\u0412\u0435\u0441\u0435\u043b\u044b\u0435 \u043a\u043e\u0442\u044f\u0442\u0430&quot;,     &quot;content&quot; : &quot;&lt;p&gt;\u0421\u043c\u0435\u0448\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e \u043a\u043e\u0442\u044f\u0442&lt;p&gt;&quot;,     &quot;tags&quot; : [ &quot;\u043a\u043e\u0442\u044f\u0442\u0430&quot;, &quot;\u0441\u043c\u0435\u0448\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f&quot; ],     &quot;published_at&quot; : &quot;2014-09-12T20:44:42+00:00&quot;   } }<\/code><\/pre>\n<p>  \u0412 \u043e\u0442\u0432\u0435\u0442\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u043d\u043e\u0432\u044b\u0435 \u043a\u043b\u044e\u0447\u0438: <code>_version<\/code> \u0438 <code>_source<\/code>. \u0412\u043e\u043e\u0431\u0449\u0435, \u0432\u0441\u0435 \u043a\u043b\u044e\u0447\u0438, \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0441 <code>_<\/code> \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u044b\u043c.<br \/>  \u041a\u043b\u044e\u0447 <code>_version<\/code> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430. \u041e\u043d \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043e\u043a. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u0438\u043c\u0435\u044e\u0449\u0438\u0439 \u0432\u0435\u0440\u0441\u0438\u044e 1. \u041c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u043a\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 1. \u0415\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u043e\u0436\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 1 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u043d\u044c\u0448\u0435 \u043d\u0430\u0441, \u0442\u043e ES \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u0442 \u043d\u0430\u0448\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0442.\u043a. \u043e\u043d \u0445\u0440\u0430\u043d\u0438\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0441 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 2. <br \/>  \u041a\u043b\u044e\u0447 <code>_source<\/code> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u043e\u0442 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043b\u0438. ES \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0442.\u043a. \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u044b. \u0414\u043b\u044f \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0438 \u043c\u0435\u0441\u0442\u0430 ES \u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u0436\u0430\u0442\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442. \u0415\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e id, \u0430 \u043d\u0435 \u0432\u0435\u0441\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430.<br \/>  \u0415\u0441\u043b\u0438 \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 _source:  <\/p>\n<pre><code class=\"bash\">curl -XGET &quot;$ES_URL\/blog\/post\/1\/_source?pretty&quot;<\/code><\/pre>\n<p>  <\/p>\n<pre><code>{   &quot;title&quot; : &quot;\u0412\u0435\u0441\u0435\u043b\u044b\u0435 \u043a\u043e\u0442\u044f\u0442\u0430&quot;,   &quot;content&quot; : &quot;&lt;p&gt;\u0421\u043c\u0435\u0448\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e \u043a\u043e\u0442\u044f\u0442&lt;p&gt;&quot;,   &quot;tags&quot; : [ &quot;\u043a\u043e\u0442\u044f\u0442\u0430&quot;, &quot;\u0441\u043c\u0435\u0448\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f&quot; ],   &quot;published_at&quot; : &quot;2014-09-12T20:44:42+00:00&quot; } <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044f:  <\/p>\n<pre><code class=\"bash\"># \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0435 title curl -XGET &quot;$ES_URL\/blog\/post\/1?_source=title&amp;pretty&quot;<\/code><\/pre>\n<p>  <\/p>\n<pre><code>{   &quot;_index&quot; : &quot;blog&quot;,   &quot;_type&quot; : &quot;post&quot;,   &quot;_id&quot; : &quot;1&quot;,   &quot;_version&quot; : 1,   &quot;found&quot; : true,   &quot;_source&quot; : {     &quot;title&quot; : &quot;\u0412\u0435\u0441\u0435\u043b\u044b\u0435 \u043a\u043e\u0442\u044f\u0442\u0430&quot;   } }<\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u0435\u0449\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u0442\u043e\u0432 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b.  <\/p>\n<pre><code class=\"bash\">curl -XPUT &quot;$ES_URL\/blog\/post\/2&quot; -d' {   &quot;title&quot;: &quot;\u0412\u0435\u0441\u0435\u043b\u044b\u0435 \u0449\u0435\u043d\u043a\u0438&quot;,   &quot;content&quot;: &quot;&lt;p&gt;\u0421\u043c\u0435\u0448\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e \u0449\u0435\u043d\u043a\u043e\u0432&lt;p&gt;&quot;,   &quot;tags&quot;: [     &quot;\u0449\u0435\u043d\u043a\u0438&quot;,     &quot;\u0441\u043c\u0435\u0448\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f&quot;   ],   &quot;published_at&quot;: &quot;2014-08-12T20:44:42+00:00&quot; }'<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\">curl -XPUT &quot;$ES_URL\/blog\/post\/3&quot; -d' {   &quot;title&quot;: &quot;\u041a\u0430\u043a \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043a\u043e\u0442\u0435\u043d\u043e\u043a&quot;,   &quot;content&quot;: &quot;&lt;p&gt;\u0414\u0443\u0448\u0435\u0440\u0430\u0437\u0434\u0438\u0440\u0430\u044e\u0449\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e \u0431\u0435\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0442\u0435\u043d\u043a\u0430 \u0441 \u0443\u043b\u0438\u0446\u044b&lt;p&gt;&quot;,   &quot;tags&quot;: [     &quot;\u043a\u043e\u0442\u044f\u0442\u0430&quot;   ],   &quot;published_at&quot;: &quot;2014-07-21T20:44:42+00:00&quot; }'<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430<\/h2>\n<p>  <\/p>\n<pre><code class=\"bash\"># \u043d\u0430\u0439\u0434\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u043e\u0441\u0442 \u043f\u043e \u0434\u0430\u0442\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0438 \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043c \u043f\u043e\u043b\u044f title \u0438 published_at curl -XGET &quot;$ES_URL\/blog\/post\/_search?pretty&quot; -d' {   &quot;size&quot;: 1,   &quot;_source&quot;: [&quot;title&quot;, &quot;published_at&quot;],   &quot;sort&quot;: [{&quot;published_at&quot;: &quot;desc&quot;}] }'<\/code><\/pre>\n<p>  <\/p>\n<pre><code>{   &quot;took&quot; : 8,   &quot;timed_out&quot; : false,   &quot;_shards&quot; : {     &quot;total&quot; : 5,     &quot;successful&quot; : 5,     &quot;failed&quot; : 0   },   &quot;hits&quot; : {     &quot;total&quot; : 3,     &quot;max_score&quot; : null,     &quot;hits&quot; : [ {       &quot;_index&quot; : &quot;blog&quot;,       &quot;_type&quot; : &quot;post&quot;,       &quot;_id&quot; : &quot;1&quot;,       &quot;_score&quot; : null,       &quot;_source&quot; : {         &quot;title&quot; : &quot;\u0412\u0435\u0441\u0435\u043b\u044b\u0435 \u043a\u043e\u0442\u044f\u0442\u0430&quot;,         &quot;published_at&quot; : &quot;2014-09-12T20:44:42+00:00&quot;       },       &quot;sort&quot; : [ 1410554682000 ]     } ]   } }<\/code><\/pre>\n<p>  \u041c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u043f\u043e\u0441\u0442. <code>size<\/code> \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043b-\u0432\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0432\u044b\u0434\u0430\u0447\u0435. <code>total<\/code> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0431\u0449\u0435\u0435 \u0447\u0438\u0441\u043b\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u043f\u043e\u0434 \u0437\u0430\u043f\u0440\u043e\u0441. <code>sort<\/code> \u0432 \u0432\u044b\u0434\u0430\u0447\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0446\u0435\u043b\u044b\u0445 \u0447\u0438\u0441\u0435\u043b, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430. \u0422.\u0435. \u0434\u0430\u0442\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0432 \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/search-request-sort.html#search-request-sort\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<h2>\u0424\u0438\u043b\u044c\u0442\u0440\u044b \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/h2>\n<p>  ES \u0441 \u0432\u0435\u0440\u0441\u0438\u0438 2 \u043d\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0435\u0442 \u0444\u0438\u043b\u044c\u0442\u044b \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/query-filter-context.html\">\u0432\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u0432<\/a>.<br \/>  \u041a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u0442\u0435\u043c, \u0447\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 _score \u0438 \u043d\u0435 \u043a\u044d\u0448\u0438\u0440\u0443\u0435\u0442\u0441\u044f. \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 _score \u044f \u043f\u043e\u043a\u0430\u0436\u0443 \u043f\u043e\u0437\u0436\u0435.<\/p>\n<h2>\u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u043e \u0434\u0430\u0442\u0435<\/h2>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/query-dsl-range-query.html\">range<\/a> \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 filter:  <\/p>\n<pre><code class=\"bash\"># \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043f\u043e\u0441\u0442\u044b, \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0435 1\u043e\u0433\u043e \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f \u0438\u043b\u0438 \u043f\u043e\u0437\u0436\u0435 curl -XGET &quot;$ES_URL\/blog\/post\/_search?pretty&quot; -d' {   &quot;filter&quot;: {     &quot;range&quot;: {       &quot;published_at&quot;: { &quot;gte&quot;: &quot;2014-09-01&quot; }     }   } }'<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0424\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u043f\u043e \u0442\u0435\u0433\u0430\u043c<\/h2>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/query-dsl-term-query.html\">term query<\/a> \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 id \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e:  <\/p>\n<pre><code class=\"bash\"># \u043d\u0430\u0439\u0434\u0435\u043c \u0432\u0441\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u0432 \u043f\u043e\u043b\u0435 tags \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0435\u0441\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 '\u043a\u043e\u0442\u044f\u0442\u0430' curl -XGET &quot;$ES_URL\/blog\/post\/_search?pretty&quot; -d' {   &quot;_source&quot;: [     &quot;title&quot;,     &quot;tags&quot;   ],   &quot;filter&quot;: {     &quot;term&quot;: {       &quot;tags&quot;: &quot;\u043a\u043e\u0442\u044f\u0442\u0430&quot;     }   } }'<\/code><\/pre>\n<p>  <\/p>\n<pre><code>{   &quot;took&quot; : 9,   &quot;timed_out&quot; : false,   &quot;_shards&quot; : {     &quot;total&quot; : 5,     &quot;successful&quot; : 5,     &quot;failed&quot; : 0   },   &quot;hits&quot; : {     &quot;total&quot; : 2,     &quot;max_score&quot; : 1.0,     &quot;hits&quot; : [ {       &quot;_index&quot; : &quot;blog&quot;,       &quot;_type&quot; : &quot;post&quot;,       &quot;_id&quot; : &quot;1&quot;,       &quot;_score&quot; : 1.0,       &quot;_source&quot; : {         &quot;title&quot; : &quot;\u0412\u0435\u0441\u0435\u043b\u044b\u0435 \u043a\u043e\u0442\u044f\u0442\u0430&quot;,         &quot;tags&quot; : [ &quot;\u043a\u043e\u0442\u044f\u0442\u0430&quot;, &quot;\u0441\u043c\u0435\u0448\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f&quot; ]       }     }, {       &quot;_index&quot; : &quot;blog&quot;,       &quot;_type&quot; : &quot;post&quot;,       &quot;_id&quot; : &quot;3&quot;,       &quot;_score&quot; : 1.0,       &quot;_source&quot; : {         &quot;title&quot; : &quot;\u041a\u0430\u043a \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u043a\u043e\u0442\u0435\u043d\u043e\u043a&quot;,         &quot;tags&quot; : [ &quot;\u043a\u043e\u0442\u044f\u0442\u0430&quot; ]       }     } ]   } }<\/code><\/pre>\n<p>  <\/p>\n<h2>\u041f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a<\/h2>\n<p>  \u0422\u0440\u0438 \u043d\u0430\u0448\u0438\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0432 \u043f\u043e\u043b\u0435 content \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:  <\/p>\n<ul>\n<li><code>&lt;p&gt;\u0421\u043c\u0435\u0448\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e \u043a\u043e\u0442\u044f\u0442&lt;p&gt;<\/code><\/li>\n<li><code>&lt;p&gt;\u0421\u043c\u0435\u0448\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e \u0449\u0435\u043d\u043a\u043e\u0432&lt;p&gt;<\/code><\/li>\n<li><code>&lt;p&gt;\u0414\u0443\u0448\u0435\u0440\u0430\u0437\u0434\u0438\u0440\u0430\u044e\u0449\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043f\u0440\u043e \u0431\u0435\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0442\u0435\u043d\u043a\u0430 \u0441 \u0443\u043b\u0438\u0446\u044b&lt;p&gt;<\/code><\/li>\n<\/ul>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/query-dsl-match-query.html\">match query<\/a> \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 id \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u0437\u0430\u0434\u0430\u043d\u043d\u043e\u0435 \u0441\u043b\u043e\u0432\u043e:  <\/p>\n<pre><code class=\"bash\"># source: false \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c _source \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 curl -XGET &quot;$ES_URL\/blog\/post\/_search?pretty&quot; -d' {   &quot;_source&quot;: false,   &quot;query&quot;: {     &quot;match&quot;: {       &quot;content&quot;: &quot;\u0438\u0441\u0442\u043e\u0440\u0438\u044f&quot;     }   } }'<\/code><\/pre>\n<p>  <\/p>\n<pre><code>{   &quot;took&quot; : 13,   &quot;timed_out&quot; : false,   &quot;_shards&quot; : {     &quot;total&quot; : 5,     &quot;successful&quot; : 5,     &quot;failed&quot; : 0   },   &quot;hits&quot; : {     &quot;total&quot; : 3,     &quot;max_score&quot; : 0.11506981,     &quot;hits&quot; : [ {       &quot;_index&quot; : &quot;blog&quot;,       &quot;_type&quot; : &quot;post&quot;,       &quot;_id&quot; : &quot;2&quot;,       &quot;_score&quot; : 0.11506981     }, {       &quot;_index&quot; : &quot;blog&quot;,       &quot;_type&quot; : &quot;post&quot;,       &quot;_id&quot; : &quot;1&quot;,       &quot;_score&quot; : 0.11506981     }, {       &quot;_index&quot; : &quot;blog&quot;,       &quot;_type&quot; : &quot;post&quot;,       &quot;_id&quot; : &quot;3&quot;,       &quot;_score&quot; : 0.095891505     } ]   } }<\/code><\/pre>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u0438\u0441\u043a\u0430\u0442\u044c &quot;\u0438\u0441\u0442\u043e\u0440\u0438\u0438&quot; \u0432 \u043f\u043e\u043b\u0435 \u043a\u043e\u043d\u0442\u0435\u043d\u0442, \u0442\u043e \u043c\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043c, \u0442.\u043a. \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430, \u0430 \u043d\u0435 \u0438\u0445 \u043e\u0441\u043d\u043e\u0432\u044b. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a, \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440.<br \/>  \u041f\u043e\u043b\u0435 <code>_score<\/code> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/guide\/current\/relevance-intro.html\">\u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u043e\u0441\u0442\u044c<\/a>. \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u043f\u043e\u043d\u044f\u0435\u0442\u0441\u044f \u0432 filter context, \u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 _score \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u043e 1, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u0443.<\/p>\n<h1>\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b<\/h1>\n<p>  <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analysis.html\">\u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b<\/a> \u043d\u0443\u0436\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0432 \u043d\u0430\u0431\u043e\u0440 \u0442\u043e\u043a\u0435\u043d\u043e\u0432.<br \/>  \u0410\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0441\u043e\u0441\u0442\u043e\u044f\u0442 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analysis-tokenizers.html\">Tokenizer<\/a> \u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analysis-tokenfilters.html\">TokenFilters<\/a>. Tokenizer \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0435\u0434\u0448\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analysis-charfilters.html\">CharFilters<\/a>. Tokenizer \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u044e\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0430 \u0442\u043e\u043a\u0435\u043d\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c \u0438 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u0438. TokenFilter \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b, \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0438\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u043d\u043e\u0432\u0443 \u0441\u043b\u043e\u0432\u0430, \u0443\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0433\u0438, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u044b. CharFilter \u2014 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0446\u0435\u043b\u0438\u043a\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u044b\u0440\u0435\u0437\u0430\u0435\u0442 html \u0442\u0435\u0433\u0438.<br \/>  \u0412 ES \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analysis-analyzers.html\">\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432<\/a>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 <a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/analysis-lang-analyzer.html#russian-analyzer\">russian<\/a>.<br \/>  \u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f <a href=\"http:\/\/www.elasticsearch.org\/guide\/en\/elasticsearch\/reference\/current\/indices-analyze.html\">api<\/a> \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b standard \u0438 russian \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 &quot;\u0412\u0435\u0441\u0435\u043b\u044b\u0435 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e \u043a\u043e\u0442\u044f\u0442&quot;:   <\/p>\n<pre><code class=\"bash\"># \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 standard        # \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435 ASCII \u0441\u0438\u043c\u0432\u043e\u043b\u044b curl -XGET &quot;$ES_URL\/_analyze?pretty&amp;analyzer=standard&amp;text=%D0%92%D0%B5%D1%81%D0%B5%D0%BB%D1%8B%D0%B5%20%D0%B8%D1%81%D1%82%D0%BE%D1%80%D0%B8%D0%B8%20%D0%BF%D1%80%D0%BE%20%D0%BA%D0%BE%D1%82%D1%8F%D1%82&quot;<\/code><\/pre>\n<p>  <\/p>\n<pre><code>{   &quot;tokens&quot; : [ {     &quot;token&quot; : &quot;\u0432\u0435\u0441\u0435\u043b\u044b\u0435&quot;,     &quot;start_offset&quot; : 0,     &quot;end_offset&quot; : 7,     &quot;type&quot; : &quot;&lt;ALPHANUM&gt;&quot;,     &quot;position&quot; : 0   }, {     &quot;token&quot; : &quot;\u0438\u0441\u0442\u043e\u0440\u0438\u0438&quot;,     &quot;start_offset&quot; : 8,     &quot;end_offset&quot; : 15,     &quot;type&quot; : &quot;&lt;ALPHANUM&gt;&quot;,     &quot;position&quot; : 1   }, {     &quot;token&quot; : &quot;\u043f\u0440\u043e&quot;,     &quot;start_offset&quot; : 16,     &quot;end_offset&quot; : 19,     &quot;type&quot; : &quot;&lt;ALPHANUM&gt;&quot;,     &quot;position&quot; : 2   }, {     &quot;token&quot; : &quot;\u043a\u043e\u0442\u044f\u0442&quot;,     &quot;start_offset&quot; : 20,     &quot;end_offset&quot; : 25,     &quot;type&quot; : &quot;&lt;ALPHANUM&gt;&quot;,     &quot;position&quot; : 3   } ] }<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\"># \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 russian curl -XGET &quot;$ES_URL\/_analyze?pretty&amp;analyzer=russian&amp;text=%D0%92%D0%B5%D1%81%D0%B5%D0%BB%D1%8B%D0%B5%20%D0%B8%D1%81%D1%82%D0%BE%D1%80%D0%B8%D0%B8%20%D0%BF%D1%80%D0%BE%20%D0%BA%D0%BE%D1%82%D1%8F%D1%82&quot;<\/code><\/pre>\n<p>  <\/p>\n<pre><code>{   &quot;tokens&quot; : [ {     &quot;token&quot; : &quot;\u0432\u0435\u0441\u0435\u043b&quot;,     &quot;start_offset&quot; : 0,     &quot;end_offset&quot; : 7,     &quot;type&quot; : &quot;&lt;ALPHANUM&gt;&quot;,     &quot;position&quot; : 0   }, {     &quot;token&quot; : &quot;\u0438\u0441\u0442\u043e\u0440&quot;,     &quot;start_offset&quot; : 8,     &quot;end_offset&quot; : 15,     &quot;type&quot; : &quot;&lt;ALPHANUM&gt;&quot;,     &quot;position&quot; : 1   }, {     &quot;token&quot; : &quot;\u043a\u043e\u0442&quot;,     &quot;start_offset&quot; : 20,     &quot;end_offset&quot; : 25,     &quot;type&quot; : &quot;&lt;ALPHANUM&gt;&quot;,     &quot;position&quot; : 3   } ] }<\/code><\/pre>\n<p>  \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0440\u0430\u0437\u0431\u0438\u043b \u0441\u0442\u0440\u043e\u043a\u0443 \u043f\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c \u0438 \u043f\u0435\u0440\u0435\u0432\u0435\u043b \u0432\u0441\u0435 \u0432 \u043d\u0438\u0436\u043d\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 russian \u2014 \u0443\u0431\u0440\u0430\u043b \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0435 \u0441\u043b\u043e\u0432\u0430, \u043f\u0435\u0440\u0435\u0432\u0435\u043b \u0432 \u043d\u0438\u0436\u043d\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043e\u0441\u043d\u043e\u0432\u0443 \u0441\u043b\u043e\u0432.<br \/>  \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 Tokenizer, TokenFilters, CharFilters \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 russian:  <\/p>\n<pre><code>{   &quot;filter&quot;: {     &quot;russian_stop&quot;: {       &quot;type&quot;:       &quot;stop&quot;,       &quot;stopwords&quot;:  &quot;_russian_&quot;     },     &quot;russian_keywords&quot;: {       &quot;type&quot;:       &quot;keyword_marker&quot;,       &quot;keywords&quot;:   []     },     &quot;russian_stemmer&quot;: {       &quot;type&quot;:       &quot;stemmer&quot;,       &quot;language&quot;:   &quot;russian&quot;     }   },   &quot;analyzer&quot;: {     &quot;russian&quot;: {       &quot;tokenizer&quot;:  &quot;standard&quot;,       \/* TokenFilters *\/       &quot;filter&quot;: [         &quot;lowercase&quot;,         &quot;russian_stop&quot;,         &quot;russian_keywords&quot;,         &quot;russian_stemmer&quot;       ]       \/* CharFilters \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 *\/     }   } }<\/code><\/pre>\n<p>  \u041e\u043f\u0438\u0448\u0435\u043c \u0441\u0432\u043e\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 russian, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0440\u0435\u0437\u0430\u0442\u044c html \u0442\u0435\u0433\u0438. \u041d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0433\u043e default, \u0442.\u043a. \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441 \u0442\u0430\u043a\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e.  <\/p>\n<pre><code>{   &quot;filter&quot;: {     &quot;ru_stop&quot;: {       &quot;type&quot;:       &quot;stop&quot;,       &quot;stopwords&quot;:  &quot;_russian_&quot;     },     &quot;ru_stemmer&quot;: {       &quot;type&quot;:       &quot;stemmer&quot;,       &quot;language&quot;:   &quot;russian&quot;     }   },   &quot;analyzer&quot;: {     &quot;default&quot;: {       \/* \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 html \u0442\u0435\u0433\u043e\u0432 *\/       &quot;char_filter&quot;: [&quot;html_strip&quot;],       &quot;tokenizer&quot;:  &quot;standard&quot;,       &quot;filter&quot;: [         &quot;lowercase&quot;,         &quot;ru_stop&quot;,         &quot;ru_stemmer&quot;       ]     }   } }<\/code><\/pre>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0437 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u0441\u044f \u0432\u0441\u0435 html \u0442\u0435\u0433\u0438, \u043f\u043e\u0442\u043e\u043c \u0435\u0435 \u0440\u0430\u0437\u043e\u0431\u044c\u0435\u0442 \u043d\u0430 \u0442\u043e\u043a\u0435\u043d\u044b tokenizer standard, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0442\u043e\u043a\u0435\u043d\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0443\u0442 \u0432 \u043d\u0438\u0436\u043d\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440, \u0443\u0434\u0430\u043b\u044f\u0442\u0441\u044f \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u0438 \u043e\u0442 \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043e\u0441\u0442\u0430\u043d\u0435\u0442\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u0430 \u0441\u043b\u043e\u0432\u0430.<\/p>\n<h1>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430<\/h1>\n<p>  \u0412\u044b\u0448\u0435 \u043c\u044b \u043e\u043f\u0438\u0441\u0430\u043b\u0438 dafault \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440. \u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043a\u043e \u0432\u0441\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u043c \u043f\u043e\u043b\u044f\u043c. \u041d\u0430\u0448 \u043f\u043e\u0441\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u0442\u0435\u0433\u043e\u0432, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0442\u0435\u0433\u0438 \u0442\u043e\u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c. \u0422.\u043a. \u043c\u044b \u0438\u0449\u0435\u043c \u043f\u043e\u0441\u0442\u044b \u043f\u043e \u0442\u043e\u0447\u043d\u043e\u043c\u0443 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044e \u0442\u0435\u0433\u0443, \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u043b\u044f \u043f\u043e\u043b\u044f tags.<br \/>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438\u043d\u0434\u0435\u043a\u0441 blog2 \u0441 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u0438 \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u043e\u043c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u043e\u043b\u044f tags:  <\/p>\n<pre><code class=\"bash\">curl -XPOST &quot;$ES_URL\/blog2&quot; -d' {   &quot;settings&quot;: {     &quot;analysis&quot;: {       &quot;filter&quot;: {         &quot;ru_stop&quot;: {           &quot;type&quot;: &quot;stop&quot;,           &quot;stopwords&quot;: &quot;_russian_&quot;         },         &quot;ru_stemmer&quot;: {           &quot;type&quot;: &quot;stemmer&quot;,           &quot;language&quot;: &quot;russian&quot;         }       },       &quot;analyzer&quot;: {         &quot;default&quot;: {           &quot;char_filter&quot;: [             &quot;html_strip&quot;           ],           &quot;tokenizer&quot;: &quot;standard&quot;,           &quot;filter&quot;: [             &quot;lowercase&quot;,             &quot;ru_stop&quot;,             &quot;ru_stemmer&quot;           ]         }       }     }   },   &quot;mappings&quot;: {     &quot;post&quot;: {       &quot;properties&quot;: {         &quot;content&quot;: {           &quot;type&quot;: &quot;string&quot;         },         &quot;published_at&quot;: {           &quot;type&quot;: &quot;date&quot;         },         &quot;tags&quot;: {           &quot;type&quot;: &quot;string&quot;,           &quot;index&quot;: &quot;not_analyzed&quot;         },         &quot;title&quot;: {           &quot;type&quot;: &quot;string&quot;         }       }     }   } }'<\/code><\/pre>\n<p>  \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0442\u0435 \u0436\u0435 3 \u043f\u043e\u0441\u0442\u0430 \u0432 \u044d\u0442\u043e\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 (blog2). \u042f \u043e\u043f\u0443\u0449\u0443 \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u0442.\u043a. \u043e\u043d \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u0435\u043d \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441 blog.<\/p>\n<h1>\u041f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439<\/h1>\n<p>  \u041f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u0435\u0449\u0435 \u043e\u0434\u043d\u0438\u043c \u0442\u0438\u043f\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432:   <\/p>\n<pre><code class=\"bash\"># \u043d\u0430\u0439\u0434\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u043e\u0432\u043e '\u0438\u0441\u0442\u043e\u0440\u0438\u0438' # query -&gt; simple_query_string -&gt; query \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 # \u043f\u043e\u043b\u0435 title \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 3 # \u043f\u043e\u043b\u0435 tags \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 2 # \u043f\u043e\u043b\u0435 content \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 1 # \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 curl -XPOST &quot;$ES_URL\/blog2\/post\/_search?pretty&quot; -d' {   &quot;query&quot;: {     &quot;simple_query_string&quot;: {       &quot;query&quot;: &quot;\u0438\u0441\u0442\u043e\u0440\u0438\u0438&quot;,       &quot;fields&quot;: [         &quot;title^3&quot;,         &quot;tags^2&quot;,         &quot;content&quot;       ]     }   } }'<\/code><\/pre>\n<p>  \u0422.\u043a. \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441 \u0440\u0443\u0441\u0441\u043a\u0438\u043c \u0441\u0442\u0435\u043c\u043c\u0438\u043d\u0433\u043e\u043c, \u0442\u043e \u044d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u0435\u0440\u043d\u0435\u0442 \u0432\u0441\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b, \u0445\u043e\u0442\u044f \u0432 \u043d\u0438\u0445 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0432\u043e &#8216;\u0438\u0441\u0442\u043e\u0440\u0438\u044f&#8217;.<br \/>  \u0417\u0430\u043f\u0440\u043e\u0441 \u043c\u043e\u0436\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code>&quot;\\&quot;fried eggs\\&quot; +(eggplant | potato) -frittata&quot;<\/code><\/pre>\n<p>  \u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:  <\/p>\n<pre><code>+ signifies AND operation | signifies OR operation - negates a single token &quot; wraps a number of tokens to signify a phrase for searching * at the end of a term signifies a prefix query ( and ) signify precedence ~N after a word signifies edit distance (fuzziness) ~N after a phrase signifies slop amount<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"bash\"># \u043d\u0430\u0439\u0434\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0431\u0435\u0437 \u0441\u043b\u043e\u0432\u0430 '\u0449\u0435\u043d\u043a\u0438' curl -XPOST &quot;$ES_URL\/blog2\/post\/_search?pretty&quot; -d' {   &quot;query&quot;: {     &quot;simple_query_string&quot;: {       &quot;query&quot;: &quot;-\u0449\u0435\u043d\u043a\u0438&quot;,       &quot;fields&quot;: [         &quot;title^3&quot;,         &quot;tags^2&quot;,         &quot;content&quot;       ]     }   } }'  # \u043f\u043e\u043b\u0443\u0447\u0438\u043c 2 \u043f\u043e\u0441\u0442\u0430 \u043f\u0440\u043e \u043a\u043e\u0442\u0438\u043a\u043e\u0432<\/code><\/pre>\n<p>  <\/p>\n<h1>\u0421\u0441\u044b\u043b\u043a\u0438<\/h1>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/www.elastic.co\">Elasctic.co<\/a><\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/index.html\">Reference<\/a><\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/guide\/current\/index.html\">Guide<\/a><\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/glossary.html\">\u0413\u043b\u043e\u0441\u0441\u0430\u0440\u0438\u0439<\/a><\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/_installation.html\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/a><\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/docs.html\">\u041c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0438 \u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438<\/a><\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/indices.html\">\u041e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0441 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438<\/a><\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/query-dsl.html\">\u0421\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432<\/a>  <\/li>\n<\/ul>\n<p>  <\/p>\n<h1>PS<\/h1>\n<p>  \u0415\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438-\u0443\u0440\u043e\u043a\u0438, \u0435\u0441\u0442\u044c \u0438\u0434\u0435\u0438 \u043d\u043e\u0432\u044b\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u0438\u043b\u0438 \u0435\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e \u0441\u043e\u0442\u0440\u0443\u0434\u043d\u0438\u0447\u0435\u0441\u0442\u0432\u0435, \u0442\u043e \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044e \u0432 \u043b\u0438\u0447\u043a\u0443 \u0438\u043b\u0438 \u043d\u0430 \u043f\u043e\u0447\u0442\u0443 m.kuzmin+habr@darkleaf.ru.                 <\/p>\n<div class=\"clear\"><\/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=\"https:\/\/habrahabr.ru\/post\/280488\/\"> https:\/\/habrahabr.ru\/post\/280488\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       Elasticsearch \u2014 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0434\u0432\u0438\u0436\u043e\u043a \u0441 json rest api, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439 Lucene \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 Java. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432 \u044d\u0442\u043e\u0433\u043e \u0434\u0432\u0438\u0436\u043a\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043d\u0430 <a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435<\/a>. \u0414\u0430\u043b\u0435\u0435 \u043f\u043e \u0442\u0435\u043a\u0441\u0442\u0443 \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c Elasticsearch \u043a\u0430\u043a ES.<br \/>  \u041f\u043e\u0434\u043e\u0431\u043d\u044b\u0435 \u0434\u0432\u0438\u0436\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u043b\u043e\u0436\u043d\u043e\u043c \u043f\u043e\u0438\u0441\u043a\u0435 \u043f\u043e \u0431\u0430\u0437\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u0438\u0441\u043a \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u043c\u043e\u0440\u0444\u043e\u043b\u043e\u0433\u0438\u0438 \u044f\u0437\u044b\u043a\u0430 \u0438\u043b\u0438 \u043f\u043e\u0438\u0441\u043a \u043f\u043e geo \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u0430\u043c.<br \/>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043f\u0440\u043e \u043e\u0441\u043d\u043e\u0432\u044b ES \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u043f\u043e\u0441\u0442\u043e\u0432 \u0431\u043b\u043e\u0433\u0430. \u041f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u0442\u044c, \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0438\u0441\u043a\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b.<\/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-277253","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277253","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=277253"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/277253\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=277253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=277253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=277253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}