{"id":457469,"date":"2025-04-25T21:01:33","date_gmt":"2025-04-25T21:01:33","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=457469"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2025-04-25T21:01:33","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=457469","title":{"rendered":"<span>\u0413\u0438\u0431\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a \u0432 Spring Data Elasticsearch: \u041f\u0440\u0435\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u00ab\u043f\u0440\u0432\u0442 \u043c\u0440\u00bb \u0432 \u00ab\u041f\u0440\u0438\u0432\u0435\u0442, \u043c\u0438\u0440!\u00bb<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4b4\/312\/983\/4b431298380f5ca9963daec0ee405857.png\" alt=\"\" title=\"\" width=\"1536\" height=\"1024\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/4b4\/312\/983\/4b431298380f5ca9963daec0ee405857.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4b4\/312\/983\/4b431298380f5ca9963daec0ee405857.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h3>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u0440\u0442\u0435\u043c\u0438\u0439 \u0418\u0432\u0430\u043d\u043e\u0432, \u0438 \u044d\u0442\u043e \u043c\u043e\u044f \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435. \u0412 \u043d\u0435\u0439 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0438\u043b, \u0440\u0430\u0431\u043e\u0442\u0430\u044f \u043d\u0430\u0434 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u0430.<\/p>\n<p>\u0421\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0436\u0451\u0441\u0442\u043a\u043e: \u043e\u043d \u043f\u043b\u043e\u0445\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0441\u044f \u0441 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430\u043c\u0438, \u0441\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u043c\u0438 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0442\u0435\u0440\u044f\u043b\u0438\u0441\u044c \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<p>\u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u0441\u0435\u0445 \u043d\u044e\u0430\u043d\u0441\u0430\u0445 \u0431\u044b\u043b\u043e \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0432\u043d\u0438\u043a\u0430\u0442\u044c \u0432 \u043e\u0431\u0438\u043b\u0438\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u0432 \u0438 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0435\u0439 \u00ab\u043d\u0430 \u0445\u043e\u0434\u0443\u00bb. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u0433\u0438\u0431\u0447\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Spring Data Elasticsearch \u2014 \u0438 \u0432\u0441\u0451 \u044d\u0442\u043e \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u0438\u0437 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438.<\/p>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432 \u043e\u0431 Elasticsearch. \u042d\u0442\u043e NoSQL \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u0434 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Lucene, \u0438\u043c\u0435\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 API, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435. Spring Data Elasticsearch \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0432 Spring-\u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430\u043c\u0438 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439. <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0433\u043e\u0440\u043e\u0434\u0430 \u0438 \u043d\u0430\u0431\u043e\u0440 \u0438\u0445 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\n<p><code>\u041c\u043e\u0441\u043a\u0432\u0430 - \u041a\u0440\u0430\u0441\u043d\u0430\u044f \u043f\u043b\u043e\u0449\u0430\u0434\u044c, \u041a\u0440\u0435\u043c\u043b\u044c, \u041c\u041a\u0410\u0414<\/code><\/p>\n<\/li>\n<li>\n<p><code>\u0423\u0444\u0430 - \u041c\u0435\u0434, \u0428\u0438\u0445\u0430\u043d\u044b, \u0422\u0440\u0438 \u0448\u0443\u0440\u0443\u043f\u0430<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 &#8212; \u0432\u044b\u0434\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u0442\u043e\u0447\u043d\u043e\u043c\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0433\u043e\u0440\u043e\u0434\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e \u0447\u0430\u0441\u0442\u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440, \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438, \u0441\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0438 \u0442.\u0434. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u043e \u0442\u043e\u0447\u043d\u043e\u043c\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0433\u043e\u0440\u043e\u0434\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043f\u043e\u0438\u0441\u043a\u0443 \u043f\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e.   <\/p>\n<h3>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/h3>\n<ul>\n<li>\n<p>Java 21<\/p>\n<\/li>\n<li>\n<p>Spring Boot<\/p>\n<\/li>\n<li>\n<p>Spring Data Elasticsearch<\/p>\n<\/li>\n<li>\n<p>Maven<\/p>\n<\/li>\n<li>\n<p>Elasticsearch 8.17.4<\/p>\n<\/li>\n<li>\n<p>Intellij IDEA<\/p>\n<\/li>\n<li>\n<p>Postman<\/p>\n<\/li>\n<\/ul>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>Elasticsearch \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 docker-\u043e\u0431\u0440\u0430\u0437, \u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043a\u0430\u0447\u0430\u0442\u044c \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c. \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a \u0431\u0435\u0437 vpn \u0438\u0437 \u0420\u043e\u0441\u0441\u0438\u0438. \u041f\u043e\u0441\u043b\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0439\u0442\u0438 \u0432<code>elasticsearch\/config\/elasticsearch.yml<\/code> \u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043e\u043d\u0438 \u043d\u0430\u043c \u043d\u0435 \u043f\u0440\u0438\u0433\u043e\u0434\u044f\u0442\u0441\u044f:<\/p>\n<pre><code class=\"yaml\">xpack.security.enabled: false xpack.security.enrollment.enabled: false xpack.security.http.ssl: \u00a0\u00a0enabled: false xpack.security.transport.ssl: \u00a0\u00a0enabled: false<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0430\u043c Elasticsearch \u0438\u0437 <code>elasticsearch-8.17.4\\bin\\elasticsearch.bat<\/code>. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u043d\u0430<\/p>\n<pre><code class=\"yaml\">GET \/ HTTP\/1.1 Host: localhost:9200<\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0442\u0432\u0435\u0442:<\/p>\n<pre><code class=\"json\">{     \"name\": \"HOME\",     \"cluster_name\": \"elasticsearch\",     \"cluster_uuid\": \"gPEw_vMLTTa1W8k5sMvSqg\",     \"version\": {         \"number\": \"8.17.4\",         \"build_flavor\": \"default\",         \"build_type\": \"zip\",         \"build_hash\": \"c63c7f5f8ce7d2e4805b7b3d842e7e792d84dda1\",         \"build_date\": \"2025-03-20T15:39:59.811110136Z\",         \"build_snapshot\": false,         \"lucene_version\": \"9.12.0\",         \"minimum_wire_compatibility_version\": \"7.17.0\",         \"minimum_index_compatibility_version\": \"7.0.0\"     },     \"tagline\": \"You Know, for Search\" }<\/code><\/pre>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Maven\/Gradle, \u0432\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u0447\u0442\u043e \u0432\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u0435\u0435. \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Maven. \u0421\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439:  <\/p>\n<pre><code class=\"xml\">&lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt; &lt;artifactId&gt;spring-boot-starter&lt;\/artifactId&gt; &lt;\/dependency&gt;  &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt; &lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt; &lt;\/dependency&gt;  &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt; &lt;artifactId&gt;spring-boot-starter-data-elasticsearch&lt;\/artifactId&gt; &lt;\/dependency&gt;  &lt;dependency&gt; &lt;groupId&gt;org.projectlombok&lt;\/groupId&gt; &lt;artifactId&gt;lombok&lt;\/artifactId&gt; &lt;version&gt;1.18.36&lt;\/version&gt; &lt;\/dependency&gt; &lt;\/dependencies&gt;<\/code><\/pre>\n<p>\u0412 <code>application.yml<\/code>\u0443\u043a\u0430\u0436\u0435\u043c \u043f\u0443\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u044d\u043b\u0430\u0441\u0442\u0438\u043a\u0443:<\/p>\n<pre><code class=\"yaml\">elasticsearch.url=localhost:9200<\/code><\/pre>\n<h3>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043a\u043e\u0434\u0443<\/h3>\n<p>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c 2 \u043c\u0435\u0442\u043e\u0434\u0430: \u043e\u0434\u0438\u043d \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0433\u043e\u0440\u043e\u0434\u0430, \u0432\u0442\u043e\u0440\u043e\u0439 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430:  <\/p>\n<pre><code class=\"java\">@RestController @RequestMapping(\"\/city\") @RequiredArgsConstructor public class CityController {     private final CityService cityService;      @PostMapping     public ResponseEntity&lt;String&gt; add(@RequestBody AddCityRequestBodyDto addCityRequestBodyDto) {         cityService.addCity(addCityRequestBodyDto);         return ResponseEntity.ok(\"Ok\");     }      @PostMapping(\"\/search\")     public ResponseEntity&lt;List&lt;String&gt;&gt; search(@RequestBody SearchCityRequestBodyDto searchCityRequestBodyDto){         List&lt;String&gt; cities = cityService.searchCity(searchCityRequestBodyDto);         return ResponseEntity.ok(cities);     } }<\/code><\/pre>\n<p>Dto \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432:  <\/p>\n<pre><code class=\"java\">public record AddCityRequestBodyDto(String name, String description) { }<\/code><\/pre>\n<pre><code class=\"java\">public record SearchCityRequestBodyDto(String name) { }<\/code><\/pre>\n<p>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430:  <\/p>\n<pre><code class=\"java\">public interface CityService {     void addCity(AddCityRequestBodyDto addCityRequestBodyDto);     List&lt;String&gt; searchCity(SearchCityRequestBodyDto searchCityRequestBodyDto); }<\/code><\/pre>\n<pre><code class=\"java\">@Service @RequiredArgsConstructor public class CityServiceImpl implements CityService{     private final CityElasticSearchClient client;      @Override     public void addCity(AddCityRequestBodyDto addCityRequestBodyDto) {         City city = CityMapper.map(addCityRequestBodyDto);         client.addCity(city);     }      @Override     public List&lt;String&gt; searchCity(SearchCityRequestBodyDto searchCityRequestBodyDto) {         String search = searchCityRequestBodyDto.name();         List&lt;City&gt; cities = client.searchCity(search);         return cities.stream().map(City::name).collect(Collectors.toList());     } }<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u0430\u043c \u043a\u043b\u0438\u0435\u043d\u0442 \u044d\u043b\u0430\u0441\u0442\u0438\u043a\u0430:<\/p>\n<pre><code class=\"java\">@Service @RequiredArgsConstructor public class CityElasticSearchClient {     private final ElasticsearchClient client;      @SneakyThrows     public void addCity(City city) {         client.index(i -&gt; i.index(\"city\").document(city));     }      @SneakyThrows     public List&lt;City&gt; searchCity(String name) {         SearchResponse&lt;City&gt; response = client.search(s -&gt; s                 .index(\"city\")                 .query(q -&gt; q                         .match(m -&gt; m                                 .field(\"name\")                                 .query(name)                         )                 ), City.class);         return response.hits().hits().stream()                 .map(hit -&gt; hit.source())                 .toList();     } }<\/code><\/pre>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438, \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 JPA, \u0433\u0434\u0435 \u0441\u0430\u043c Spring \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u0430 \u0438\u0445 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442, \u043d\u043e \u044f \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e \u043a\u043b\u0438\u0435\u043d\u0442 \u0438\u0437 <code>co.elastic.clients.elasticsearch.ElasticsearchClient<\/code>.<\/p>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430: <\/p>\n<pre><code class=\"java\">@Document(indexName = \"city\") public record City(@Id @Field(type = FieldType.Keyword) String name, @Field(type = FieldType.Text) String description) { }<\/code><\/pre>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442 &#8212; \u044d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435. Spring  \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0438\u043f\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u043b\u0435\u0439, \u0438 \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u043e\u0447\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a, \u043d\u0430\u043c \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0442\u0438\u043f <code>keyword<\/code>. \u0414\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e &#8212; \u0442\u0438\u043f <code>text<\/code>.<\/p>\n<p>\u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u0430\u043f\u043f\u0435\u0440:   <\/p>\n<pre><code class=\"java\">@UtilityClass public class CityMapper {     public static City map(AddCityRequestBodyDto addCityRequestBodyDto) {         return new City(addCityRequestBodyDto.name(), addCityRequestBodyDto.description());     } }<\/code><\/pre>\n<p>\u041d\u0435 \u043c\u043e\u0433\u0443 \u043d\u0435 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0447\u0443\u0434\u0435\u0441\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 &#8212; Elasticvue. \u041c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c desktop-\u0432\u0435\u0440\u0441\u0438\u044e, \u0430 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u044d\u043b\u0430\u0441\u0442\u0438\u043a\u0430 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c. <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/99f\/c61\/de4\/99fc61de47802199a07fbb57ff3b7a06.png\" alt=\"\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Spring \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c City\" title=\"\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Spring \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c City\" width=\"1909\" height=\"368\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/99f\/c61\/de4\/99fc61de47802199a07fbb57ff3b7a06.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/99f\/c61\/de4\/99fc61de47802199a07fbb57ff3b7a06.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Spring \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c City<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0430\u0440\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441:<\/p>\n<pre><code>POST \/city HTTP\/1.1 Host: localhost:8080 Content-Type: application\/json Content-Length: 88  {     \"name\": \"Moscow\",     \"description\": \"\u041a\u0440\u0435\u043c\u043b\u044c, \u041a\u0440\u0430\u0441\u043d\u0430\u044f \u043f\u043b\u043e\u0449\u0430\u0434\u044c, \u041c\u043e\u0441\u043a\u0432\u0430-\u0441\u0438\u0442\u0438\" }<\/code><\/pre>\n<pre><code>POST \/city HTTP\/1.1 Host: localhost:8080 Content-Type: application\/json Content-Length: 70  {     \"name\": \"Ufa\",     \"description\": \"\u041c\u0435\u0434, \u0428\u0438\u0445\u0430\u043d\u044b, \u0422\u0440\u0438 \u0448\u0443\u0440\u0443\u043f\u0430\" }<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0432 Elasticvue:  <\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/357\/750\/74d\/35775074def5f6b15b7ecdf4a08b4467.png\" alt=\"\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432 Elasticvue\" title=\"\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432 Elasticvue\" width=\"1905\" height=\"333\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/357\/750\/74d\/35775074def5f6b15b7ecdf4a08b4467.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/357\/750\/74d\/35775074def5f6b15b7ecdf4a08b4467.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432 Elasticvue<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438\u0441\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c:<\/p>\n<pre><code>POST \/city\/search HTTP\/1.1 Host: localhost:8080 Content-Type: application\/json Content-Length: 25  {     \"name\": \"Ufa\" }<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"json\">[     \"\u041c\u0435\u0434, \u0428\u0438\u0445\u0430\u043d\u044b, \u0422\u0440\u0438 \u0448\u0443\u0440\u0443\u043f\u0430\" ]<\/code><\/pre>\n<p>\u0417\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e! \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0435\u0441\u043b\u0438 \u043c\u044b \u0438\u0449\u0435\u043c \u043f\u043e \u0442\u043e\u0447\u043d\u043e\u043c\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0433\u043e\u0440\u043e\u0434\u0430, \u0432\u0435\u0434\u044c \u043d\u0430\u0439\u0442\u0438 \u0443\u0436\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043c\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u043c\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 &#8212; \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440:  <\/p>\n<pre><code class=\"java\">@PostMapping(\"\/searchByDesc\") public ResponseEntity&lt;List&lt;String&gt;&gt; searchByDesc(@RequestBody SearchCityByDescRequestBodyDto searchCityRequestBodyDto) {     List&lt;String&gt; cities = cityService.searchCityByDesc(searchCityRequestBodyDto);     return ResponseEntity.ok(cities); }<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c:<\/p>\n<pre><code class=\"java\">public record SearchCityByDescRequestBodyDto(String description) { }<\/code><\/pre>\n<p>\u041d\u043e\u0432\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b:<\/p>\n<pre><code class=\"java\">List&lt;String&gt; searchCityByDesc(SearchCityByDescRequestBodyDto searchCityByDescRequestBodyDto);<\/code><\/pre>\n<pre><code class=\"java\">@Override public List&lt;String&gt; searchCityByDesc(SearchCityByDescRequestBodyDto searchCityByDescRequestBodyDto) {     String search = searchCityByDescRequestBodyDto.description();     List&lt;City&gt; cities = client.searchCityByDesc(search);     return cities.stream().map(City::description).collect(Collectors.toList()); } <\/code><\/pre>\n<p>\u041c\u0435\u0442\u043e\u0434 \u043a\u043b\u0438\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"java\">@SneakyThrows public List&lt;City&gt; searchCityByDesc(String description) {     SearchResponse&lt;City&gt; response = client.search(s -&gt; s             .index(\"city\")             .query(q -&gt; q                     .match(m -&gt; m                             .field(\"description\")                             .query(description)                     )             ), City.class);     return response.hits().hits().stream()             .map(hit -&gt; hit.source())             .toList(); }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c:<\/p>\n<pre><code>POST \/city\/searchByDesc HTTP\/1.1 Host: localhost:8080 Content-Type: application\/json Content-Length: 32  {     \"description\": \"\u0422\u0440\u0438\" }<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"json\">[     \"\u041c\u0435\u0434, \u0428\u0438\u0445\u0430\u043d\u044b, \u0422\u0440\u0438 \u0448\u0443\u0440\u0443\u043f\u0430\" ]<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, Elasticsearch \u043e\u0442\u0434\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435. \u041c\u0430\u043b\u043e \u0442\u043e\u0433\u043e, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u043f\u043e\u0438\u0441\u043a \u0441 \u043d\u0438\u0436\u043d\u0438\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u043c:  <\/p>\n<pre><code>POST \/city\/searchByDesc HTTP\/1.1 Host: localhost:8080 Content-Type: application\/json Content-Length: 32  {     \"description\": \"\u0442\u0440\u0438\" }<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0440\u043e\u0441 \u0432\u044b\u0448\u0435 \u0434\u0430\u0441\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442. \u0427\u0443\u0434\u0435\u0441\u0430! \u041e\u0434\u043d\u0430\u043a\u043e \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u043f\u043e \u0441\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044e:<\/p>\n<pre><code>POST \/city\/searchByDesc HTTP\/1.1 Host: localhost:8080 Content-Type: application\/json Content-Length: 33  {     \"description\": \"\u0442\u0440\u043e\u0435\" }<\/code><\/pre>\n<p>\u043e\u0442\u0432\u0435\u0442 \u043f\u0443\u0441\u0442, \u043c\u0430\u0433\u0438\u0438 \u043d\u0435 \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c. \u0422\u0430\u043a \u043a\u0430\u043a \u0436\u0435 \u043f\u043e\u0438\u0441\u043a \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442? \u0414\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u043b\u0430\u0441\u0442\u0438\u043a\u0430. \u041f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e\u0431 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430\u0445, \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0445 \u0438 \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0446\u0438\u0438. Elasticsearch \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0432\u0430\u0448\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0430\u043f\u0443 &#8212; \u0442\u043e\u043a\u0435\u043d\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043b\u044e\u0447\u0435\u0439 \u0438 \u0432\u0430\u0448\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043a\u0430\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435. \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u044d\u043b\u0430\u0441\u0442\u0438\u043a \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043a\u0435\u043d (\u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c, \u043e\u0431 \u044d\u0442\u043e\u043c \u0434\u0430\u043b\u0435\u0435) \u0441 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438-\u043a\u043b\u044e\u0447\u0430\u043c\u0438 \u0438 \u0432\u044b\u0434\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442. \u0421\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044f \u043d\u0430 \u0442\u043e\u043a\u0435\u043d\u044b \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u044d\u0442\u0430\u043f\u043e\u0432:  <\/p>\n<ol>\n<li>\n<p><strong>Character Filters<\/strong> (\u043f\u043e\u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u0430\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f)  <\/p>\n<\/li>\n<li>\n<p><strong>Tokenizer<\/strong> (\u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0446\u0438\u044f)  <\/p>\n<\/li>\n<li>\n<p><strong>Token Filters<\/strong> (\u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0432\u043a\u043b\u044e\u0447\u0430\u044f \u0441\u0442\u0435\u043c\u043c\u0438\u043d\u0433)  <\/p>\n<\/li>\n<\/ol>\n<p>\u0412\u0441\u0435 \u044d\u0442\u0438 \u044d\u0442\u0430\u043f\u044b \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438, \u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0430\u043b\u0435\u0435. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0434\u043b\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430 <code>city<\/code>\u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043c\u044b \u043d\u0435 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440. \u0412 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u043c \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:  <\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u0435 \u043d\u0430 \u0442\u043e\u043a\u0435\u043d\u044b (Tokenization) \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440 (Standard Tokenizer), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0437\u0434\u0435\u043b\u044f\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u0441\u043b\u043e\u0432\u0430 \u043f\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c \u0438 \u0437\u043d\u0430\u043a\u0430\u043c \u043f\u0443\u043d\u043a\u0442\u0443\u0430\u0446\u0438\u044e.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043a \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 (Lowercasing) \u2014 \u0447\u0430\u0441\u0442\u044c \u044d\u0442\u0430\u043f\u0430 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438, \u0432\u0441\u0435 \u0442\u043e\u043a\u0435\u043d\u044b \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u043a \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443.    <\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u043f\u0440\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438, \u0442\u0430\u043a \u0438 \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u044d\u0442\u0430\u043f\u043e\u0432.  <\/p>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0434\u043b\u044f <code>\u041c\u0435\u0434, \u0428\u0438\u0445\u0430\u043d\u044b, \u0422\u0440\u0438 \u0448\u0443\u0440\u0443\u043f\u0430<\/code> \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u044f\u0442\u0441\u044f \u0442\u043e\u043a\u0435\u043d\u044b <code>[\u043c\u0435\u0434, \u0448\u0438\u0445\u0430\u043d\u044b, \u0442\u0440\u0438, \u0448\u0443\u0440\u0443\u043f\u0430]<\/code>.<\/p>\n<p>\u041f\u043e\u043c\u0438\u043c\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0438\u0434\u044b \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u041f\u0440\u0438\u043c\u0435\u0440 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445:<\/p>\n<ul>\n<li>\n<p><code>Whitespace<\/code>&#8212;  \u0420\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u0430\u043c, \u043d\u0435 \u0443\u0434\u0430\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u043a\u0438 \u043f\u0440\u0435\u043f\u0438\u043d\u0430\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p><code>Letter<\/code>&#8212; \u0420\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u043f\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0431\u0443\u043a\u0432\u0430\u043c\u0438<\/p>\n<\/li>\n<li>\n<p><code>Pattern<\/code>&#8212; \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u0438\u0432\u043a\u0438<\/p>\n<\/li>\n<li>\n<p><code>Keyword<\/code>&#8212; \u041d\u0435 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u0432\u043e\u043e\u0431\u0449\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0441\u0435 \u043a\u0430\u043a \u043e\u0434\u0438\u043d \u0442\u043e\u043a\u0435\u043d<\/p>\n<\/li>\n<li>\n<p><code>ngram \/ edge_ngram<\/code> &#8212; \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \/ \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430<\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0431 <code>ngram<\/code> \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u0435. \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u043e\u043d \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u0444\u0440\u0430\u0437\u0443 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u043b\u043e\u0432\u0430, \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u044f \u0437\u043d\u0430\u043a\u0438 \u043f\u0440\u0435\u043f\u0438\u043d\u0430\u043d\u0438\u044f, \u0437\u0430\u0442\u0435\u043c \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043b\u043e\u0432\u043e \u043d\u0430  \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0434\u043b\u0438\u043d\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u0447\u0430\u0441\u0442\u044f\u043c \u0441\u043b\u043e\u0432\u0430 (\u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043b\u043e\u0432\u0430). Edge-ngram \u0436\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u043a\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043b\u043e\u0432\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0443 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0430\u0432\u0442\u043e\u043a\u043e\u043c\u043f\u043b\u0438\u0442). \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 <code>min_gram<\/code> \u0438 <code>max_gram<\/code>\u0434\u043b\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u0438\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432. <\/p>\n<p>\u041c\u0430\u0433\u0438\u044e \u0441 \u043f\u043e\u0438\u0441\u043a\u043e\u043c \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435 \u043f\u043e\u043d\u044f\u043b\u0438 &#8212; \u0441\u043b\u043e\u0432\u043e \u043f\u0440\u0438 \u043f\u043e\u0438\u0441\u043a\u0435 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043d\u0438\u0436\u043d\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0432 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0435. \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0441\u043b\u043e\u0432\u0443 <code>\u0442\u0440\u0438<\/code> \u0434\u0430\u0441\u0442 \u043d\u0430\u043c \u043d\u0430\u0448 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u043b\u043e\u0432\u043e \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0442\u043e\u043a\u0435\u043d. \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c \u0441 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0446\u0438\u0438, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c 2 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u0430, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0438\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u0438 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430\u0445 \u0438 \u0441\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f\u0445.<\/p>\n<h4>\u041d\u0430 \u044d\u0442\u0430\u043f\u0435 post-\u0438\u043d\u0434\u0435\u0441\u0430\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 fuziness<\/h4>\n<p>Fuzziness \u2014 \u044d\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0432 Elasticsearch, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u043e\u0432\u043f\u0430\u0434\u0435\u043d\u0438\u044f \u0434\u0430\u0436\u0435 \u043f\u0440\u0438 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430\u0445 \u0438\u043b\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0440\u0430\u0437\u043b\u0438\u0447\u0438\u044f\u0445 \u0432 \u0441\u043b\u043e\u0432\u0430\u0445. \u041e\u043d \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0438 \u041b\u0435\u0432\u0435\u043d\u0448\u0442\u0435\u0439\u043d\u0430 (\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439: \u0432\u0441\u0442\u0430\u0432\u043a\u0430, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435, \u0437\u0430\u043c\u0435\u043d\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432), \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u043f\u0440\u0435\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0435. \u0415\u0441\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 fuzziness \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 2, Elasticsearch \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430, \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043d\u0430 2 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0412\u0430\u0436\u043d\u043e \u043d\u0435 \u043f\u0435\u0440\u0435\u0431\u043e\u0440\u0449\u0438\u0442\u044c \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c, \u0432\u0435\u0434\u044c \u043f\u0440\u0438 \u0441\u043b\u043e\u0432\u043e \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0447\u0430\u0442\u044c \u043a\u0430\u0440\u0434\u0438\u043d\u0430\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0438\u0441\u043a\u043e\u043c\u043e\u0433\u043e. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u0440\u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u0435 \u043f\u043e \u0442\u043e\u043a\u0435\u043d\u0430\u043c \u044d\u043b\u0430\u0441\u0442\u0438\u043a \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0438\u0445 \u0441\u043e \u0441\u043b\u043e\u0432\u043e\u043c \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 \u043e\u0442\u043b\u0438\u0447\u0438\u044f\u043c\u0438 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0432 2 \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u0445. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 fuzziness \u0432 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0438\u0441\u043a\u0430:<\/p>\n<pre><code class=\"java\">@SneakyThrows public List&lt;City&gt; searchCityByDesc(String description) {     SearchResponse&lt;City&gt; response = client.search(s -&gt; s             .index(\"city\")             .query(q -&gt; q                     .match(m -&gt; m                             .field(\"description\")                             .query(description)                             .fuzziness(\"2\")                     )             ), City.class);     return response.hits().hits().stream()             .map(hit -&gt; hit.source())             .toList(); }<\/code><\/pre>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u044d\u043b\u0430\u0441\u0442\u0438\u043a \u0434\u0430\u0441\u0442 \u043d\u0430\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u0432\u0438\u0434\u0430:  <\/p>\n<pre><code>POST \/city\/searchByDesc HTTP\/1.1 Host: localhost:8080 Content-Type: application\/json Content-Length: 33  {     \"description\": \"\u0442\u0440\u043e\u0435\" } <\/code><\/pre>\n<pre><code class=\"json\">[ \u00a0 \u00a0 \"\u041c\u0435\u0434, \u0428\u0438\u0445\u0430\u043d\u044b, \u0422\u0440\u0438 \u0448\u0443\u0440\u0443\u043f\u0430\" ]<\/code><\/pre>\n<h4>\u0427\u0435\u0440\u0435\u0437 stemming \u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u0438  <\/h4>\n<p>2 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0441\u043d\u043e\u0432\u0430\u043d \u043d\u0430 \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044e\/\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u043b\u043e\u0432\u043e\u0444\u043e\u0440\u043c. \u0418\u0437 \u043c\u0438\u043d\u0443\u0441\u043e\u0432 &#8212; \u043f\u043b\u043e\u0445\u0430\u044f \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u0441 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430\u043c\u0438. \u042d\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0432\u0430\u043c.  \u0417\u0434\u0435\u0441\u044c 2 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043f\u0443\u0442\u0438 &#8212; \u0447\u0435\u0440\u0435\u0437 stemming \u0438\u043b\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u0438. Stemming \u044d\u0442\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0441\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0441\u043b\u043e\u0432\u0430 \u043a \u043a\u043e\u0440\u043d\u044e.<\/p>\n<p>\u0412\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u041f\u0435\u0440\u0435\u0434 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u043c \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0434\u043b\u044f fuzziness \u0438\u0437 \u043c\u0435\u0442\u043e\u0434\u0430 searchCityByDesc! \u0412 \u043f\u0430\u043f\u043a\u0435 <code>resources<\/code> \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 <code>elasticsearch<\/code>, \u0432 \u043d\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c <code>analyzer-settings.json<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0439 \u0441\u0442\u0435\u043c\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"json\">{   \"analysis\": {     \"analyzer\": {       \"my_custom_analyzer\": {         \"type\": \"custom\",         \"tokenizer\": \"standard\",         \"filter\": [\"lowercase\", \"russian_stemmer\"]       }     },     \"filter\": {       \"russian_stemmer\": {         \"type\": \"stemmer\",         \"language\": \"russian\"       }     }   } }<\/code><\/pre>\n<p>\u0421\u0442\u043e\u0438\u0442 \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0432 \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u0430\u0436\u043d\u0430. \u0422\u043e \u0435\u0441\u0442\u044c, \u043d\u0430\u0448\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 <code>\u041c\u0435\u0434, \u0428\u0438\u0445\u0430\u043d\u044b, \u0422\u0440\u0438 \u0448\u0443\u0440\u0443\u043f\u0430<\/code> \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0431\u0438\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0442\u043e\u043a\u0435\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c \u043d\u0430 <code>[\u041c\u0435\u0434, \u0428\u0438\u0445\u0430\u043d\u044b, \u0422\u0440\u0438, \u0428\u0443\u0440\u0443\u043f\u0430]<\/code>, \u0434\u0430\u043b\u0435\u0435 \u043f\u0440\u0438\u0432\u0438\u0434\u0435\u0442\u0441\u044f \u043a \u043d\u0438\u0436\u043d\u0435\u043c\u0443 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0443 \u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0442\u0435\u043c \u0432 \u0434\u0435\u043b\u043e \u0432\u0441\u0442\u0443\u043f\u0438\u0442 \u0441\u0442\u0435\u043c\u043c\u0435\u0440 &#8212; \u043e\u043d \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u0442 \u043a \u043a\u043e\u0440\u043d\u044f\u043c &#8212; <code>[\u043c\u0435\u0434, \u0448\u0438\u0445\u0430, \u0442\u0440\u0438, \u0448\u0443\u0440\u0443\u043f]<\/code>. \u041f\u043e\u0447\u0435\u043c\u0443 \u0448\u0438\u0445\u0430? \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0435, \u0438 \u0441\u0442\u0435\u043c\u043c\u0435\u0440\u044b \u043f\u043e\u0440\u043e\u0439 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u043d\u0435\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0443\u0435\u043c\u043e. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u043d\u0430 \u043a\u0430\u043a\u0438\u0435 \u0442\u043e\u043a\u0435\u043d\u044b \u0432 \u0438\u0442\u043e\u0433\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0430\u0441\u044c \u043d\u0430\u0448\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430, \u043c\u043e\u0436\u043d\u043e \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443  <\/p>\n<pre><code>POST \/city\/_analyze HTTP\/1.1 Host: localhost:9200 Content-Type: application\/json Content-Length: 70  {   \"field\": \"description\",   \"text\": \"\u041c\u0435\u0434, \u0428\u0438\u0445\u0430\u043d\u044b, \u0422\u0440\u0438 \u0448\u0443\u0440\u0443\u043f\u0430\" }<\/code><\/pre>\n<pre><code class=\"json\">{     \"tokens\": [         {             \"token\": \"\u043c\u0435\u0434\",             \"start_offset\": 0,             \"end_offset\": 3,             \"type\": \"&lt;ALPHANUM&gt;\",             \"position\": 0         },         {             \"token\": \"\u0448\u0438\u0445\u0430\",             \"start_offset\": 5,             \"end_offset\": 11,             \"type\": \"&lt;ALPHANUM&gt;\",             \"position\": 1         },         {             \"token\": \"\u0442\u0440\u0438\",             \"start_offset\": 13,             \"end_offset\": 16,             \"type\": \"&lt;ALPHANUM&gt;\",             \"position\": 2         },         {             \"token\": \"\u0448\u0443\u0440\u0443\u043f\",             \"start_offset\": 17,             \"end_offset\": 23,             \"type\": \"&lt;ALPHANUM&gt;\",             \"position\": 3         }     ] }<\/code><\/pre>\n<p>\u0414\u043e\u043f\u0438\u0448\u0435\u043c \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 \u0438 \u043f\u0440\u043e\u043f\u0438\u0448\u0435\u043c \u0434\u043b\u044f \u043f\u043e\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440:  <\/p>\n<pre><code class=\"java\">@Document(indexName = \"city\") @Setting(settingPath =\"\/elasticsearch\/analyzer-settings.json\" ) public record City(@Id @Field(type = FieldType.Keyword) String name, @Field(type = FieldType.Text, analyzer = \"my_custom_analyzer\") String description) { }<\/code><\/pre>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u043f\u043e\u043c\u0435\u043d\u044f\u043b\u0430\u0441\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443\u0434\u0430\u043b\u0438\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441 \u0447\u0435\u0440\u0435\u0437 Elasticsvue \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u043d\u043e\u0432\u043e\u0439, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0432 \u043f\u0430\u0440\u0443 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u0422\u0435\u043f\u0435\u0440\u044c \u0435\u0441\u043b\u0438  \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u0441\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>\u0448\u0443\u0440\u0443\u043f\u043e\u0432<\/code>, <code>\u043c\u0435\u0434\u0430 <\/code>\u0438\u043b\u0438 <code>\u0448\u0438\u0445\u0430\u043d<\/code>, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u0430\u0448\u0443 \u0441\u0442\u0440\u043e\u043a\u0443. <\/p>\n<p>\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e \u043d\u0430\u0431\u043e\u0440\u0443 \u0444\u043e\u0440\u043c \u0438 \u043f\u0440\u0430\u0432\u0438\u043b \u043f\u0440\u0438\u0432\u043e\u0434\u044f\u0442 \u0441\u043b\u043e\u0432\u043e \u043a \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u043c\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <strong>Hunspell<\/strong>. \u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u044b \u0441\u0430\u043c\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0432\u0430\u043c \u0444\u043e\u0440\u043c\u044b \u0432 \u044d\u0442\u043e\u0442, \u043b\u0438\u0431\u043e \u0432\u0430\u0448 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u0412\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0430\u0432\u0438\u043b, \u043c\u043e\u0440\u0444\u043e\u043b\u043e\u0433\u0438\u0438 \u0438 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0439.<\/p>\n<p>\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0440\u0430\u0445 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430, \u043e\u043d \u0435\u0441\u0442\u044c \u0432 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u0445. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u043c Elasticsearch \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e <code>\\config\\hunspell\\ru_RU<\/code>. \u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0442\u0443\u0434\u0430   <\/p>\n<ul>\n<li>\n<p><code>ru_RU.dic<\/code> &#8212; \u0441\u0430\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u044c  <\/p>\n<\/li>\n<li>\n<p><code>ru_RU.aff<\/code> &#8212; \u0430\u0444\u0444\u0438\u043a\u0441\u044b (\u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f, \u043f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0438 \u0438 \u0442. \u0434.)  <\/p>\n<\/li>\n<\/ul>\n<p>\u041c\u0435\u043d\u044f\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0432 <code>analyzer-settings.json<\/code>:  <\/p>\n<pre><code class=\"json\">{   \"analysis\": {     \"filter\": {       \"russian_hunspell\": {         \"type\": \"hunspell\",         \"locale\": \"ru_RU\"       }     },     \"analyzer\": {       \"my_custom_analyzer\": {         \"type\": \"custom\",         \"tokenizer\": \"standard\",         \"filter\": [           \"lowercase\",           \"russian_hunspell\"         ]       }     }   } }<\/code><\/pre>\n<p>\u0423\u0434\u0430\u043b\u044f\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441, \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442. \u042d\u0442\u043e\u0442 \u043f\u043e\u0438\u0441\u043a \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u0441\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f\u043c, \u043d\u043e \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0434\u043b\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u043d\u043e\u0432\u044b\u0445. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043b\u044f \u0435\u0433\u043e \u0441\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f. \u0412 \u0441\u0442\u0435\u043c\u043c\u0435\u0440 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430, \u043d\u043e \u043d\u0435 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0433\u0438\u0431\u043a\u043e, \u043a\u0430\u043a \u0432 Hunspell.<\/p>\n<p>\u041f\u043e\u0434\u0445\u043e\u0434 \u0441\u043e \u0441\u0442\u0435\u043c\u043c\u0435\u0440\u0430\u043c\u0438 \u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u043c\u0438 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0438\u0441\u043a\u0430, \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0437\u0430\u0434\u0430\u0447\u0438.<\/p>\n<h3>\u0412\u044b\u0432\u043e\u0434\u044b<\/h3>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e5a\/e6d\/868\/e5ae6d8685b27316a6aef80007b2789c.jpg\" alt=\"\u041a\u043e\u0433\u0434\u0430 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b \u043f\u043e\u0438\u0441\u043a \u043f\u043e\u0434 \u0441\u0435\u0431\u044f\" title=\"\u041a\u043e\u0433\u0434\u0430 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b \u043f\u043e\u0438\u0441\u043a \u043f\u043e\u0434 \u0441\u0435\u0431\u044f\" width=\"780\" height=\"440\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e5a\/e6d\/868\/e5ae6d8685b27316a6aef80007b2789c.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e5a\/e6d\/868\/e5ae6d8685b27316a6aef80007b2789c.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041a\u043e\u0433\u0434\u0430 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b \u043f\u043e\u0438\u0441\u043a \u043f\u043e\u0434 \u0441\u0435\u0431\u044f<\/figcaption><\/div>\n<\/figure>\n<p>\u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043b\u0438 \u043f\u0440\u0438\u0435\u043c\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 Elasticsearch \u0434\u043b\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u0430, \u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0438\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Spring Data Elasticsearch. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0433\u0438\u0431\u043a\u0438\u0439 \u043f\u043e\u0438\u0441\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u0435\u0440\u043f\u0438\u043c \u043a \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430\u043c \u0438 \u0434\u0430\u044e\u0449\u0438\u0439 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c post-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0441 fuzziness-\u043f\u043e\u0434\u0445\u043e\u0434\u043e\u043c. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0440\u0443\u0447\u043d\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043d\u0430\u0434 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0438 \u043f\u043e\u0438\u0441\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0440\u043e\u0433\u0438\u043c, \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0441\u0442\u0435\u043c\u043c\u0435\u0440\u044b \u0438\u043b\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u0438. \u041d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0441\u0442\u0430\u0442\u044c\u044f \u0431\u044b\u043b\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0439 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439, \u0434\u043e \u0441\u043a\u043e\u0440\u044b\u0445 \u0432\u0441\u0442\u0440\u0435\u0447!  <\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/904554\/\"> https:\/\/habr.com\/ru\/articles\/904554\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<h3>\u041f\u0440\u0435\u0434\u0438\u0441\u043b\u043e\u0432\u0438\u0435<\/h3>\n<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u0440\u0442\u0435\u043c\u0438\u0439 \u0418\u0432\u0430\u043d\u043e\u0432, \u0438 \u044d\u0442\u043e \u043c\u043e\u044f \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0430 \u0425\u0430\u0431\u0440\u0435. \u0412 \u043d\u0435\u0439 \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u044b\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0438\u043b, \u0440\u0430\u0431\u043e\u0442\u0430\u044f \u043d\u0430\u0434 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u0430.<\/p>\n<p>\u0421\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0436\u0451\u0441\u0442\u043a\u043e: \u043e\u043d \u043f\u043b\u043e\u0445\u043e \u0441\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0441\u044f \u0441 \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430\u043c\u0438, \u0441\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u043c\u0438 \u043d\u0430\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u043c\u0438, \u0438\u0437-\u0437\u0430 \u0447\u0435\u0433\u043e \u0442\u0435\u0440\u044f\u043b\u0438\u0441\u044c \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<p>\u0420\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u0441\u0435\u0445 \u043d\u044e\u0430\u043d\u0441\u0430\u0445 \u0431\u044b\u043b\u043e \u043d\u0435\u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0432\u043d\u0438\u043a\u0430\u0442\u044c \u0432 \u043e\u0431\u0438\u043b\u0438\u0435 \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u0432 \u0438 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0435\u0439 \u00ab\u043d\u0430 \u0445\u043e\u0434\u0443\u00bb. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u0433\u0438\u0431\u0447\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Spring Data Elasticsearch \u2014 \u0438 \u0432\u0441\u0451 \u044d\u0442\u043e \u043d\u0430 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u0438\u0437 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438.<\/p>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432 \u043e\u0431 Elasticsearch. \u042d\u0442\u043e NoSQL \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043f\u043e\u0434 \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043f\u043e\u0438\u0441\u043a \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Lucene, \u0438\u043c\u0435\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 API, \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435. Spring Data Elasticsearch \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0432 Spring-\u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430\u043c\u0438 \u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0439. <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0433\u043e\u0440\u043e\u0434\u0430 \u0438 \u043d\u0430\u0431\u043e\u0440 \u0438\u0445 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\n<p><code>\u041c\u043e\u0441\u043a\u0432\u0430 - \u041a\u0440\u0430\u0441\u043d\u0430\u044f \u043f\u043b\u043e\u0449\u0430\u0434\u044c, \u041a\u0440\u0435\u043c\u043b\u044c, \u041c\u041a\u0410\u0414<\/code><\/p>\n<\/li>\n<li>\n<p><code>\u0423\u0444\u0430 - \u041c\u0435\u0434, \u0428\u0438\u0445\u0430\u043d\u044b, \u0422\u0440\u0438 \u0448\u0443\u0440\u0443\u043f\u0430<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u0430\u0448\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 &#8212; \u0432\u044b\u0434\u0430\u0442\u044c \u043d\u0430\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e \u0442\u043e\u0447\u043d\u043e\u043c\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0433\u043e\u0440\u043e\u0434\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u0437\u0430\u0447\u0430\u0441\u0442\u0443\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e \u0447\u0430\u0441\u0442\u0438 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a. \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u0440\u0435\u0433\u0438\u0441\u0442\u0440, \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0438, \u0441\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0438 \u0442.\u0434. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u043e \u0442\u043e\u0447\u043d\u043e\u043c\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0433\u043e\u0440\u043e\u0434\u0430, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043f\u043e\u0438\u0441\u043a\u0443 \u043f\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e.   <\/p>\n<h3>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/h3>\n<ul>\n<li>\n<p>Java 21<\/p>\n<\/li>\n<li>\n<p>Spring Boot<\/p>\n<\/li>\n<li>\n<p>Spring Data Elasticsearch<\/p>\n<\/li>\n<li>\n<p>Maven<\/p>\n<\/li>\n<li>\n<p>Elasticsearch 8.17.4<\/p>\n<\/li>\n<li>\n<p>Intellij IDEA<\/p>\n<\/li>\n<li>\n<p>Postman<\/p>\n<\/li>\n<\/ul>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f<\/h3>\n<p>Elasticsearch \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 docker-\u043e\u0431\u0440\u0430\u0437, \u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043a\u0430\u0447\u0430\u0442\u044c \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c. \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442. \u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a \u0431\u0435\u0437 vpn \u0438\u0437 \u0420\u043e\u0441\u0441\u0438\u0438. \u041f\u043e\u0441\u043b\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0439\u0442\u0438 \u0432<code>elasticsearch\/config\/elasticsearch.yml<\/code> \u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043e\u043d\u0438 \u043d\u0430\u043c \u043d\u0435 \u043f\u0440\u0438\u0433\u043e\u0434\u044f\u0442\u0441\u044f:<\/p>\n<pre><code class=\"yaml\">xpack.security.enabled: false xpack.security.enrollment.enabled: false xpack.security.http.ssl: \u00a0\u00a0enabled: false xpack.security.transport.ssl: \u00a0\u00a0enabled: false<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0430\u043c Elasticsearch \u0438\u0437 <code>elasticsearch-8.17.4\\bin\\elasticsearch.bat<\/code>. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0443 \u043d\u0430<\/p>\n<pre><code class=\"yaml\">GET \/ HTTP\/1.1 Host: localhost:9200<\/code><\/pre>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0442\u0432\u0435\u0442:<\/p>\n<pre><code class=\"json\">{     \"name\": \"HOME\",     \"cluster_name\": \"elasticsearch\",     \"cluster_uuid\": \"gPEw_vMLTTa1W8k5sMvSqg\",     \"version\": {         \"number\": \"8.17.4\",         \"build_flavor\": \"default\",         \"build_type\": \"zip\",         \"build_hash\": \"c63c7f5f8ce7d2e4805b7b3d842e7e792d84dda1\",         \"build_date\": \"2025-03-20T15:39:59.811110136Z\",         \"build_snapshot\": false,         \"lucene_version\": \"9.12.0\",         \"minimum_wire_compatibility_version\": \"7.17.0\",         \"minimum_index_compatibility_version\": \"7.0.0\"     },     \"tagline\": \"You Know, for Search\" }<\/code><\/pre>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Maven\/Gradle, \u0432\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u0447\u0442\u043e \u0432\u0430\u043c \u0443\u0434\u043e\u0431\u043d\u0435\u0435. \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Maven. \u0421\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439:  <\/p>\n<pre><code class=\"xml\">&lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt; &lt;artifactId&gt;spring-boot-starter&lt;\/artifactId&gt; &lt;\/dependency&gt;  &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt; &lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt; &lt;\/dependency&gt;  &lt;dependency&gt; &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt; &lt;artifactId&gt;spring-boot-starter-data-elasticsearch&lt;\/artifactId&gt; &lt;\/dependency&gt;  &lt;dependency&gt; &lt;groupId&gt;org.projectlombok&lt;\/groupId&gt; &lt;artifactId&gt;lombok&lt;\/artifactId&gt; &lt;version&gt;1.18.36&lt;\/version&gt; &lt;\/dependency&gt; &lt;\/dependencies&gt;<\/code><\/pre>\n<p>\u0412 <code>application.yml<\/code>\u0443\u043a\u0430\u0436\u0435\u043c \u043f\u0443\u0442\u044c \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u043a \u044d\u043b\u0430\u0441\u0442\u0438\u043a\u0443:<\/p>\n<pre><code class=\"yaml\">elasticsearch.url=localhost:9200<\/code><\/pre>\n<h3>\u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c \u043a \u043a\u043e\u0434\u0443<\/h3>\n<p>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c 2 \u043c\u0435\u0442\u043e\u0434\u0430: \u043e\u0434\u0438\u043d \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0433\u043e\u0440\u043e\u0434\u0430, \u0432\u0442\u043e\u0440\u043e\u0439 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430:  <\/p>\n<pre><code class=\"java\">@RestController @RequestMapping(\"\/city\") @RequiredArgsConstructor public class CityController {     private final CityService cityService;      @PostMapping     public ResponseEntity&lt;String&gt; add(@RequestBody AddCityRequestBodyDto addCityRequestBodyDto) {         cityService.addCity(addCityRequestBodyDto);         return ResponseEntity.ok(\"Ok\");     }      @PostMapping(\"\/search\")     public ResponseEntity&lt;List&lt;String&gt;&gt; search(@RequestBody SearchCityRequestBodyDto searchCityRequestBodyDto){         List&lt;String&gt; cities = cityService.searchCity(searchCityRequestBodyDto);         return ResponseEntity.ok(cities);     } }<\/code><\/pre>\n<p>Dto \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432:  <\/p>\n<pre><code class=\"java\">public record AddCityRequestBodyDto(String name, String description) { }<\/code><\/pre>\n<pre><code class=\"java\">public record SearchCityRequestBodyDto(String name) { }<\/code><\/pre>\n<p>\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430:  <\/p>\n<pre><code class=\"java\">public interface CityService {     void addCity(AddCityRequestBodyDto addCityRequestBodyDto);     List&lt;String&gt; searchCity(SearchCityRequestBodyDto searchCityRequestBodyDto); }<\/code><\/pre>\n<pre><code class=\"java\">@Service @RequiredArgsConstructor public class CityServiceImpl implements CityService{     private final CityElasticSearchClient client;      @Override     public void addCity(AddCityRequestBodyDto addCityRequestBodyDto) {         City city = CityMapper.map(addCityRequestBodyDto);         client.addCity(city);     }      @Override     public List&lt;String&gt; searchCity(SearchCityRequestBodyDto searchCityRequestBodyDto) {         String search = searchCityRequestBodyDto.name();         List&lt;City&gt; cities = client.searchCity(search);         return cities.stream().map(City::name).collect(Collectors.toList());     } }<\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u0430\u043c \u043a\u043b\u0438\u0435\u043d\u0442 \u044d\u043b\u0430\u0441\u0442\u0438\u043a\u0430:<\/p>\n<pre><code class=\"java\">@Service @RequiredArgsConstructor public class CityElasticSearchClient {     private final ElasticsearchClient client;      @SneakyThrows     public void addCity(City city) {         client.index(i -&gt; i.index(\"city\").document(city));     }      @SneakyThrows     public List&lt;City&gt; searchCity(String name) {         SearchResponse&lt;City&gt; response = client.search(s -&gt; s                 .index(\"city\")                 .query(q -&gt; q                         .match(m -&gt; m                                 .field(\"name\")                                 .query(name)                         )                 ), City.class);         return response.hits().hits().stream()                 .map(hit -&gt; hit.source())                 .toList();     } }<\/code><\/pre>\n<p>\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u0441 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438, \u043f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 JPA, \u0433\u0434\u0435 \u0441\u0430\u043c Spring \u043f\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u0430 \u0438\u0445 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442, \u043d\u043e \u044f \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u044e \u043a\u043b\u0438\u0435\u043d\u0442 \u0438\u0437 <code>co.elastic.clients.elasticsearch.ElasticsearchClient<\/code>.<\/p>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430: <\/p>\n<pre><code class=\"java\">@Document(indexName = \"city\") public record City(@Id @Field(type = FieldType.Keyword) String name, @Field(type = FieldType.Text) String description) { }<\/code><\/pre>\n<p>\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442 &#8212; \u044d\u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435. Spring  \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0438\u043f\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u043b\u0435\u0439, \u0438 \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u0435\u0439\u0447\u0430\u0441 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u043e\u0447\u043d\u044b\u0439 \u043f\u043e\u0438\u0441\u043a, \u043d\u0430\u043c \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0442\u0438\u043f <code>keyword<\/code>. \u0414\u043b\u044f \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0439 \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044e &#8212; \u0442\u0438\u043f <code>text<\/code>.<\/p>\n<p>\u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u0430\u043f\u043f\u0435\u0440:   <\/p>\n<pre><code class=\"java\">@UtilityClass public class CityMapper {     public static City map(AddCityRequestBodyDto addCityRequestBodyDto) {         return new City(addCityRequestBodyDto.name(), addCityRequestBodyDto.description());     } }<\/code><\/pre>\n<p>\u041d\u0435 \u043c\u043e\u0433\u0443 \u043d\u0435 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0447\u0443\u0434\u0435\u0441\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 &#8212; Elasticvue. \u041c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c desktop-\u0432\u0435\u0440\u0441\u0438\u044e, \u0430 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e \u044d\u043b\u0430\u0441\u0442\u0438\u043a\u0430 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c. <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Spring \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u0441\u0442 \u0438\u043d\u0434\u0435\u043a\u0441 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c City<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u0430\u0440\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441:<\/p>\n<pre><code>POST \/city HTTP\/1.1 Host: localhost:8080 Content-Type: application\/json Content-Length: 88  {     \"name\": \"Moscow\",     \"description\": \"\u041a\u0440\u0435\u043c\u043b\u044c, \u041a\u0440\u0430\u0441\u043d\u0430\u044f \u043f\u043b\u043e\u0449\u0430\u0434\u044c, \u041c\u043e\u0441\u043a\u0432\u0430-\u0441\u0438\u0442\u0438\" }<\/code><\/pre>\n<pre><code>POST \/city HTTP\/1.1 Host: localhost:8080 Content-Type: application\/json Content-Length: 70  {     \"name\": \"Ufa\",     \"description\": \"\u041c\u0435\u0434, \u0428\u0438\u0445\u0430\u043d\u044b, \u0422\u0440\u0438 \u0448\u0443\u0440\u0443\u043f\u0430\" }<\/code><\/pre>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0432 Elasticvue:  <\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0432 Elasticvue<\/figcaption><\/div>\n<\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438\u0441\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c:<\/p>\n<pre><code>POST \/city\/search HTTP\/1.1 Host: localhost:8080 Content-Type: application\/json Content-Length: 25  {     \"name\": \"Ufa\" }<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"json\">[     \"\u041c\u0435\u0434, \u0428\u0438\u0445\u0430\u043d\u044b, \u0422\u0440\u0438 \u0448\u0443\u0440\u0443\u043f\u0430\" ]<\/code><\/pre>\n<p>\u0417\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e! \u041e\u0434\u043d\u0430\u043a\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0435\u0441\u043b\u0438 \u043c\u044b \u0438\u0449\u0435\u043c \u043f\u043e \u0442\u043e\u0447\u043d\u043e\u043c\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044e \u0433\u043e\u0440\u043e\u0434\u0430, \u0432\u0435\u0434\u044c \u043d\u0430\u0439\u0442\u0438 \u0443\u0436\u0435 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u043c\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e\u043c\u0435\u043d\u044f\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043f\u043e\u0438\u0441\u043a \u043f\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u043c\u0443 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 &#8212; \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u043f\u043e\u0438\u0441\u043a. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043c\u0435\u0442\u043e\u0434 \u0432 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440:  <\/p>\n<pre><code class=\"java\">@PostMapping(\"\/searchByDesc\") public ResponseEntity&lt;List&lt;String&gt;&gt; searchByDesc(@RequestBody SearchCityByDescRequestBodyDto searchCityRequestBodyDto) {     List&lt;String&gt; cities = cityService.searchCityByDesc(searchCityRequestBodyDto);     return ResponseEntity.ok(cities); }<\/code><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u043e\u0432\u0443\u044e \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c:<\/p>\n<pre><code class=\"java\">public record SearchCityByDescRequestBodyDto(String description) { }<\/code><\/pre>\n<p>\u041d\u043e\u0432\u044b\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b:<\/p>\n<pre><code class=\"java\">List&lt;String&gt; searchCityByDesc(SearchCityByDescRequestBodyDto searchCityByDescRequestBodyDto);<\/code><\/pre>\n<pre><code class=\"java\">@Override public List&lt;String&gt; searchCityByDesc(SearchCityByDescRequestBodyDto searchCityByDescRequestBodyDto) {     String search = searchCityByDescRequestBodyDto.description();     List&lt;City&gt; cities = client.searchCityByDesc(search);     return cities.stream().map(City::description).collect(Collectors.toList()); } <\/code><\/pre>\n<p>\u041c\u0435\u0442\u043e\u0434 \u043a\u043b\u0438\u0435\u043d\u0442\u0430:<\/p>\n<pre><code class=\"java\">@SneakyThrows public List&lt;City&gt; searchCityByDesc(String description) {     SearchResponse&lt;City&gt; response = client.search(s -&gt; s             .index(\"city\")             .query(q -&gt; q                     .match(m -&gt; m                             .field(\"description\")                             .query(description)                     )             ), City.class);     return response.hits().hits().stream()             .map(hit -&gt; hit.source())             .toList(); }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c:<\/p>\n<pre><code>POST \/city\/searchByDesc HTTP\/1.1 Host: localhost:8080 Content-Type: application\/json Content-Length: 32  {     \"description\": \"\u0422\u0440\u0438\" }<\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"json\">[     \"\u041c\u0435\u0434, \u0428\u0438\u0445\u0430\u043d\u044b, \u0422\u0440\u0438 \u0448\u0443\u0440\u0443\u043f\u0430\" ]<\/code><\/pre>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, Elasticsearch \u043e\u0442\u0434\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435. \u041c\u0430\u043b\u043e \u0442\u043e\u0433\u043e, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 \u043f\u043e\u0438\u0441\u043a \u0441 \u043d\u0438\u0436\u043d\u0438\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u043c:  <\/p>\n<pre><code>POST \/city\/searchByDesc HTTP\/1.1 Host: localhost:8080 Content-Type: application\/json Content-Length: 32  {<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-457469","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457469","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=457469"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457469\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=457469"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=457469"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=457469"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}