{"id":310961,"date":"2020-10-05T09:00:31","date_gmt":"2020-10-05T09:00:31","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=310961"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-10-05T09:00:31","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=310961","title":{"rendered":"\u041a\u0430\u043a Magento 2 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0441 Vue Storefront"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/rshb\/blog\/521692\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ot\/_j\/as\/ot_jaskbktt1qcllsm3fxgziujw.png\"><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041f\u0430\u0432\u0435\u043b \u0438 \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0431\u044d\u043a\u0435\u043d\u0434 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439. \u041a\u0430\u043a \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b <a href=\"https:\/\/habr.com\/ru\/users\/andreyhabr\/\" class=\"user_link\">AndreyHabr<\/a>, \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u0441\u0442\u0435\u043a\u0435 <a href=\"https:\/\/magento.com\/\">Adobe Magento 2<\/a> (\u0434\u043b\u044f \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0442\u0438 \u0434\u0430\u043b\u0435\u0435 \u044f \u0431\u0443\u0434\u0443 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0435 M2) \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u044d\u043a\u0435\u043d\u0434\u0430 \u0438 <a href=\"https:\/\/www.vuestorefront.io\/\">Vue Storefront<\/a> (VS) \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430.<\/p>\n<p>  <\/p>\n<p>\u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0441\u0442\u0435\u043a\u0430 VS\/M2 \u2014 \u043c\u044b \u0443\u0436\u0435 <a href=\"https:\/\/habr.com\/ru\/company\/rshb\/blog\/518746\/\">\u043f\u0438\u0441\u0430\u043b\u0438<\/a> \u043e\u0431 \u044d\u0442\u043e\u043c \u0440\u0430\u043d\u0435\u0435. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0438\u0436\u0435.<\/p>\n<p>  <\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0441 VS \u0438\u0437\u043d\u0443\u0442\u0440\u0438 M2: \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440\u043e\u0432, \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u044b, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u044f \u043a\u0440\u0430\u0442\u043a\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440 \u0434\u043b\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438. <\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0433\u043d\u0430\u043b\u0438!<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"moduli-integracii\">\u041c\u043e\u0434\u0443\u043b\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438<\/h2>\n<p>  <\/p>\n<p>\u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 M2 \u0438 VS \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Divante. \u041c\u043e\u0434\u0443\u043b\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432 \u0438\u0445 <a href=\"https:\/\/github.com\/DivanteLtd\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 Github<\/a> \u0438 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0434 <a href=\"https:\/\/opensource.org\/licenses\/MIT\">\u043b\u0438\u0446\u0435\u043d\u0437\u0438\u0435\u0439 MIT<\/a>. \u041f\u0430\u043a\u0435\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f: <\/p>\n<p>  <\/p>\n<ul>\n<li>Divante_ReviewApi;<\/li>\n<li>Divante_VsbridgeIndexerCore;<\/li>\n<li>Divante_VsbridgeIndexerCatalog;<\/li>\n<li>Divante_VsbridgeIndexerCms;<\/li>\n<li>Divante_VsbridgeIndexerTax;<\/li>\n<li>Divante_VsbridgeIndexerReview;<\/li>\n<li>Divante_VsbridgeIndexerAgreement;<\/li>\n<li>Divante_VsbridgeDownloadable.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u0435\u0441\u043b\u043e\u0436\u043d\u043e \u0434\u043e\u0433\u0430\u0434\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u0441\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u043a\u0440\u043e\u043c\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0435\u0439 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0441 \u0446\u0435\u043b\u044c\u044e \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0438\u0445 \u0432 Elasticsearch, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 VS \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439. \u041c\u043e\u0434\u0443\u043b\u044c <code>Divante_ReviewApi<\/code> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 API \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043e\u0442\u0437\u044b\u0432\u0430\u043c\u0438 (\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435, \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0439).<\/p>\n<p>  <\/p>\n<p>\u0418\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u043c\u043e\u0434\u0443\u043b\u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u0438 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430;<\/li>\n<li>CMS \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0431\u043b\u043e\u043a\u0438;<\/li>\n<li>\u041e\u0442\u0437\u044b\u0432\u044b;<\/li>\n<li>\u041d\u0430\u043b\u043e\u0433\u0438;<\/li>\n<li>\u0421\u043e\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u044f;<\/li>\n<li>\u0421\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u044b.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u0443\u0435\u0442, \u0447\u0442\u043e \u0441\u0432\u044f\u0437\u043a\u0430 M2 \u0438 VS \u043f\u0440\u044f\u043c\u043e \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432\u0441\u0435 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 \u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<h2 id=\"indeksiruem\">\u0418\u043d\u0434\u0435\u043a\u0441\u0438\u0440\u0443\u0435\u043c!<\/h2>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u0431\u043b\u0438\u0437\u0438 \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440\u043e\u0432. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440 CMS Page \u0438\u0437 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043f\u043e\u0441\u0442\u0430\u0432\u043a\u0438 Divante. \u0412 \u0446\u0435\u043b\u043e\u043c, \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440\u044b VSBridge \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043d\u0430 \u0442\u0435\u0445 \u0436\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u0445, \u0447\u0442\u043e \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440\u044b \u0432 M2.<\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;indexer id=&quot;vsbridge_cms_page_indexer&quot; view_id=&quot;vsbridge_cms_page_indexer&quot; class=&quot;Divante\\VsbridgeIndexerCms\\Model\\Indexer\\CmsPage&quot;&gt;     &lt;title translate=&quot;true&quot;&gt;Vsbridge Cms Page Indexer&lt;\/title&gt;     &lt;description translate=&quot;true&quot;&gt;Update Cms Pages in Elastic&lt;\/description&gt; &lt;\/indexer&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><em>etc\/indexer.xml<\/em><\/p>\n<p>  <\/p>\n<p>\u0413\u0434\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f <strong>\u043a\u043b\u0430\u0441\u0441-\u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440<\/strong>. \u0414\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043e\u0431\u0449\u0438\u0439 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440\u043e\u0432 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 <code>\\Magento\\Framework\\Indexer\\ActionInterface<\/code>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u0441\u0445\u043e\u0436 \u0441 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440\u0430\u043c\u0438 M2. \u0415\u0433\u043e \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u0437\u0430\u043f\u0443\u0441\u043a \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445. \u0417\u0434\u0435\u0441\u044c \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>$cmsPageAction<\/code>, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0435 Action \u043a\u043b\u0430\u0441\u0441, \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u044e\u0449\u0438\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">public function execute($ids) {     $stores = $this-&gt;storeManager-&gt;getStores();      foreach ($stores as $store) {         $this-&gt;indexHandler-&gt;saveIndex($this-&gt;cmsPageAction-&gt;rebuild($store-&gt;getId(), $ids), $store);         $this-&gt;indexHandler-&gt;cleanUpByTransactionKey($store, $ids);         $this-&gt;cacheProcessor-&gt;cleanCacheByTags($store-&gt;getId(), ['cmsPage']);     } }<\/code><\/pre>\n<p>  <\/p>\n<p><em>Model\/Indexer\/CmsPage.php<\/em><\/p>\n<p>  <\/p>\n<p><strong>Action \u043a\u043b\u0430\u0441\u0441<\/strong> \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 rebuild, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e \u0438 \u0433\u043e\u0442\u043e\u0432\u0438\u0442 \u0435\u0435 \u0434\u043b\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">public function rebuild($storeId = 1, array $pageIds = []) {     $lastPageId = 0;      do {         $cmsPages = $this-&gt;resourceModel-&gt;loadPages($storeId, $pageIds, $lastPageId);          foreach ($cmsPages as $pageData) {             $lastPageId = (int)$pageData['page_id'];             $pageData['id'] = $lastPageId;             $pageData['content'] = $pageData['content'];             $pageData['active'] = (bool)$pageData['is_active'];              if (isset($pageData['sort_order'])) {                 $pageData['sort_order'] = (int)$pageData['sort_order'];             }              unset($pageData['creation_time'], $pageData['update_time'], $pageData['page_id']);             unset($pageData['created_in']);             unset($pageData['is_active'], $pageData['custom_theme'], $pageData['website_root']);              yield $lastPageId =&gt; $pageData;         }     } while (!empty($cmsPages)); }<\/code><\/pre>\n<p>  <\/p>\n<p><em>Model\/Indexer\/Action\/CmsPage.php<\/em><\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u043e\u043c loadPages <strong>\u0440\u0435\u0441\u0443\u0440\u0441\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438<\/strong> \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">public function loadPages($storeId = 1, array $pageIds = [], $fromId = 0, $limit = 1000) {     $metaData = $this-&gt;getCmsPageMetaData();     $linkFieldId = $metaData-&gt;getLinkField();      $select = $this-&gt;getConnection()-&gt;select()-&gt;from(['cms_page' =&gt; $metaData-&gt;getEntityTable()]);     $select-&gt;join(         ['store_table' =&gt; $this-&gt;resource-&gt;getTableName('cms_page_store')],         &quot;cms_page.$linkFieldId = store_table.$linkFieldId&quot;,         []     )-&gt;group(&quot;cms_page.$linkFieldId&quot;);      $select-&gt;where(         'store_table.store_id IN (?)',         [             Store::DEFAULT_STORE_ID,             $storeId,         ]     );      if (!empty($pageIds)) {         $select-&gt;where('cms_page.page_id IN (?)', $pageIds);     }      $select-&gt;where('is_active = ?', 1);     $select-&gt;where('cms_page.page_id &gt; ?', $fromId)         -&gt;limit($limit)         -&gt;order('cms_page.page_id');      return $this-&gt;getConnection()-&gt;fetchAll($select); }<\/code><\/pre>\n<p>  <\/p>\n<p><em>Model\/ResourceModel\/CmsPage.php<\/em><\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u0438\u0437\u0432\u043b\u0435\u043a\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e, \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u043c\u0438 \u043f\u043e 1000 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043b\u0438\u0431\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0441 IDs, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 $pageIds.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044e <strong>IndexHandler<\/strong> \u043a\u043b\u0430\u0441\u0441\u0430 Indexer \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0432 \u0431\u0430\u0437\u0443 elasticsearch:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">public function saveIndex(Traversable $documents, StoreInterface $store) {     try {         $index = $this-&gt;getIndex($store);         $storeId = (int)$store-&gt;getId();         $batchSize = $this-&gt;indexOperations-&gt;getBatchIndexingSize();          foreach ($this-&gt;batch-&gt;getItems($documents, $batchSize) as $docs) {             foreach ($index-&gt;getDataProviders() as $dataProvider) {                 if (!empty($docs)) {                     $docs = $dataProvider-&gt;addData($docs, $storeId);                 }             }              if (!empty($docs)) {                 $bulkRequest = $this-&gt;indexOperations-&gt;createBulk()-&gt;addDocuments(                     $index-&gt;getName(),                     $index-&gt;getType(),                     $docs                 );                  $this-&gt;indexOperations-&gt;optimizeEsIndexing($storeId, $index-&gt;getName());                 $response = $this-&gt;indexOperations-&gt;executeBulk($storeId, $bulkRequest);                 $this-&gt;indexOperations-&gt;cleanAfterOptimizeEsIndexing($storeId, $index-&gt;getName());                 $this-&gt;bulkLogger-&gt;log($response);             }              $docs = null;         }          if ($index-&gt;isNew()) {             $this-&gt;indexOperations-&gt;switchIndexer($store-&gt;getId(), $index-&gt;getName(), $index-&gt;getIdentifier());         }          $this-&gt;indexOperations-&gt;refreshIndex($store-&gt;getId(), $index);     } catch (ConnectionDisabledException $exception) {         \/\/ do nothing, ES indexer disabled in configuration     } catch (ConnectionUnhealthyException $exception) {         $this-&gt;indexerLogger-&gt;error($exception-&gt;getMessage());         $this-&gt;indexOperations-&gt;cleanAfterOptimizeEsIndexing($storeId, $index-&gt;getName());         throw $exception;     } }<\/code><\/pre>\n<p>  <\/p>\n<p><em>\u041c\u043e\u0434\u0443\u043b\u044c Divante_VsbridgeIndexerCore: Indexer\/GenericIndexerHandler.php<\/em><\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0432\u0430\u0436\u043d\u043e \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u044c <strong>\u043a\u043b\u0430\u0441\u0441 Mapper<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0434\u0430\u0435\u0442 \u0442\u0438\u043f\u044b \u043f\u043e\u043b\u0435\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0434\u043b\u044f elasticsearch. <\/p>\n<p>  <\/p>\n<pre><code class=\"php\">public function getMappingProperties() {     $properties = [         'id' =&gt; ['type' =&gt; FieldInterface::TYPE_LONG],         'active' =&gt; ['type' =&gt; FieldInterface::TYPE_BOOLEAN],         'sort_order' =&gt; ['type' =&gt; FieldInterface::TYPE_LONG],         \/\/compatible with product\/category attribute mapping         'page_layout' =&gt; ['type' =&gt; FieldInterface::TYPE_KEYWORD],         'identifier' =&gt; ['type' =&gt; FieldInterface::TYPE_KEYWORD],     ];      foreach ($this-&gt;textFields as $field) {         $properties[$field] = ['type' =&gt; FieldInterface::TYPE_TEXT];     }      $mappingObject = new \\Magento\\Framework\\DataObject();     $mappingObject-&gt;setData('properties', $properties);      $this-&gt;eventManager-&gt;dispatch(         'elasticsearch_cms_page_mapping_properties',         ['mapping' =&gt; $mappingObject]     );      return $mappingObject-&gt;getData(); }<\/code><\/pre>\n<p>  <\/p>\n<p><em>Index\/Mapping\/CmsPage.php<\/em><\/p>\n<p>  <\/p>\n<p>\u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043f\u043e\u043b\u043d\u043e\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u043c \u043f\u043e\u0438\u0441\u043a\u0435 \u2014 \u0432 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u043b\u044e \u043d\u0430\u0434\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0442\u0438\u043f <code>keyword<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 <code>vsbridge_indices.xml<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0434\u0430\u0435\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0438 \u043a\u043b\u0430\u0441\u0441 Mapper \u0434\u043b\u044f \u043f\u043e\u043b\u0435\u0439 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;index identifier=&quot;cms_page&quot; mapping=&quot;Divante\\VsbridgeIndexerCms\\Index\\Mapping\\CmsPage&quot;&gt;     &lt;data_providers&gt;         &lt;data_provider name=&quot;content&quot;&gt;Divante\\VsbridgeIndexerCms\\Model\\Indexer\\DataProvider\\Page\\ContentData&lt;\/data_provider&gt;     &lt;\/data_providers&gt; &lt;\/index&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><em>etc\/vsbridge_indices.xml<\/em><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u043b\u043d\u0430\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>bin\/magento indexer:reindex<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0432\u0441\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440\u044b \u041c2. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440, \u0443\u043a\u0430\u0437\u0430\u0432 \u0435\u0433\u043e \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u044b: <code>bin\/magento indexer:reindex &lt;indexer_identifier&gt;<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0418\u0437 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u0432\u044b\u0432\u043e\u0434\u043e\u0432:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u041e\u0431\u044a\u0435\u043a\u0442 \u0432 elasticsearch <em>\u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u043d<\/em> \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u0440\u0430\u0436\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442 \u0432 \u0411\u0414 M2. \u0415\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0442\u0438\u0442\u044c, \u0443\u0431\u0440\u0430\u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u044f, \u0438\u043b\u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u2014 \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u0438\u0434\u0436\u043e\u0438\u043d\u0438\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0422\u0430\u043a\u0436\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u0441\u0432\u043e\u0431\u043e\u0434\u0443 \u0438 \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u043f\u0440\u0438 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 elasticsearch, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044c \u043f\u043e\u043b\u044f \u0441 foreign \u043a\u043b\u044e\u0447\u0430\u043c\u0438 \u0432 \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f;<\/li>\n<li>\u041e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 <em>\u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u0430\u0442\u044c \u0438\u0437 \u0431\u0430\u0437\u044b<\/em> \u2014 \u043e\u043d \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0432\u0437\u044f\u0442 \u043e\u0442\u043a\u0443\u0434\u0430 \u0443\u0433\u043e\u0434\u043d\u043e, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043f\u043e\u043b\u0443\u0447\u0435\u043d \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a \u0432\u043d\u0435\u0448\u043d\u0435\u043c\u0443 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0443;<\/li>\n<li>\u0412\u044b\u0431\u043e\u0440\u043a\u0443 <em>\u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u041c2<\/em>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0447\u0435\u0440\u0435\u0437 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0438\u043b\u0438 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u0438, \u0430 \u043d\u0435 \u0441\u044b\u0440\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0432 \u0411\u0414, \u043a\u0430\u043a \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435.<\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"aktualizaciya-dannyh-v-elasticsearch\">\u0410\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 elasticsearch<\/h2>\n<p>  <\/p>\n<p>\u041a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u0443\u044e \u0440\u0435\u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u043a\u043e\u0433\u0434\u0430 \u043a\u0430\u043a\u043e\u0439 \u043b\u0438\u0431\u043e \u043e\u0431\u044a\u0435\u043a\u0442 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0431\u0430\u0437\u0435, \u0431\u044b\u043b\u043e \u0431\u044b \u0440\u0430\u0441\u0442\u043e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e. \u0414\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0431\u0430\u0437\u0435 \u0438 \u0438\u0445 \u0430\u043a\u0442\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0432 elasticsearch \u0441\u043b\u0435\u0434\u0438\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c M2, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <strong>mview<\/strong>. \u0414\u0430\u043d\u043d\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u0432 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u0435, \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0444\u0438\u043a\u0441\u0438\u0440\u0443\u044e\u0442\u0441\u044f ID \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 cron-\u0437\u0430\u0434\u0430\u0447\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 ID \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0445 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u0437 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u044d\u0442\u0438\u0445 ID (\u0432\u0441\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u043c\u0435\u0442\u043e\u0434 <code>loadPages<\/code> \u0440\u0435\u0441\u0443\u0440\u0441\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u043c\u0430\u0441\u0441\u0438\u0432 ID). \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435.<\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043e\u0432 \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0444\u0430\u0439\u043b\u0430 <em>mview.xml<\/em>:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;view id=&quot;vsbridge_cms_page_indexer&quot; class=&quot;Divante\\VsbridgeIndexerCms\\Model\\Indexer\\CmsPage&quot; group=&quot;indexer&quot;&gt;     &lt;subscriptions&gt;         &lt;table name=&quot;cms_page&quot; entity_column=&quot;page_id&quot;\/&gt;     &lt;\/subscriptions&gt; &lt;\/view&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><em>etc\/mview.xml<\/em><\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440\u0443 \u0441\u0442\u0430\u0442\u0443\u0441\u0430 <em>Scheduled<\/em> \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0430\u044f \u0432 \u0444\u0430\u0439\u043b\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u0430 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u0435\u0442 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b \u043d\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435, \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435. ID \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0432\u0435\u0440\u0441\u0438\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439:<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/it\/6h\/wp\/it6hwpp2ov_tra8er4bulz1cxdk.png\"><\/p>\n<p>  <\/p>\n<p>\u041a\u0440\u043e\u043d-\u0437\u0430\u0434\u0430\u0447\u0430 \u043e\u0434\u0438\u043d \u0440\u0430\u0437 \u0432 \u043c\u0438\u043d\u0443\u0442\u0443 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e) \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u044b\u0431\u043e\u0440\u043a\u0443 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0442\u0430\u0431\u043b\u0438\u0446, \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 ID \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 elasticsearch \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u0447\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c.<\/p>\n<p>  <\/p>\n<h2 id=\"dobavlyaem-indekser-dlya-svoey-suschnosti\">\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440 \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438<\/h2>\n<p>  <\/p>\n<p>\u0413\u043b\u0430\u0432\u043d\u044b\u043c \u0434\u043e\u0441\u0442\u043e\u0438\u043d\u0441\u0442\u0432\u043e\u043c \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043a \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044e. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u044d\u043b\u0430\u0441\u0442\u0438\u043a\u0435. \u041d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0435 whiteRabbit. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u043b\u044f \u0435\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 M2 \u043c\u043e\u0434\u0443\u043b\u044c, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0432\u043e\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;config xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:Indexer\/etc\/indexer.xsd&quot;&gt;     &lt;indexer id=&quot;vsbridge_white_rabbit_indexer&quot; view_id=&quot;vsbridge_white_rabbit_indexer&quot;              class=&quot;RSHB\\WhiteRabbit\\Model\\Indexer\\WhiteRabbit&quot;&gt;         &lt;title translate=&quot;true&quot;&gt;White Rabbits Indexer&lt;\/title&gt;         &lt;description translate=&quot;true&quot;&gt;Update White Rabbits in Elastic&lt;\/description&gt;     &lt;\/indexer&gt; &lt;\/config&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><em>etc\/indexer.xml<\/em><\/p>\n<p>  <\/p>\n<p>\u0410 \u0442\u0430\u043a\u0436\u0435 \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u043c \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0438 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0438\u043d\u0434\u0435\u043a\u0441\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u043d\u0430\u0448\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;config xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot;         xsi:noNamespaceSchemaLocation=&quot;urn:magento:framework:Mview\/etc\/mview.xsd&quot;&gt;     &lt;view id=&quot;vsbridge_white_rabbit_indexer&quot; class=&quot;RSHB\\WhiteRabbit\\Model\\Indexer\\WhiteRabbit&quot; group=&quot;indexer&quot;&gt;         &lt;subscriptions&gt;             &lt;table name=&quot;rshb_white_rabbit\u201d entity_column=&quot;id&quot; \/&gt;         &lt;\/subscriptions&gt;     &lt;\/view&gt; &lt;\/config&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><em>etc\/mview.xml<\/em><\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;indices xmlns:xsi=&quot;http:\/\/www.w3.org\/2001\/XMLSchema-instance&quot; xsi:noNamespaceSchemaLocation=&quot;urn:magento:module:Divante_VsbridgeIndexerCore:etc\/vsbridge_indices.xsd&quot;&gt;     &lt;index identifier=&quot;white_rabbit&quot; mapping=&quot;RSHB\\WhiteRabbit\\Index\\Mapping\\WhiteRabbit&quot; \/&gt; &lt;\/indices&gt;<\/code><\/pre>\n<p>  <\/p>\n<p><em>etc\/vsbridge_indices.xml<\/em><\/p>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440, \u043c\u0430\u043f\u043f\u0435\u0440 \u0438 \u044d\u043a\u0448\u0435\u043d:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php namespace RSHB\\WhiteRabbit\\Model\\Indexer;  use Divante\\VsbridgeIndexerCore\\Indexer\\StoreManager; use Exception; use Magento\\Framework\\Indexer\\ActionInterface as IndexerActionInterface; use Magento\\Framework\\Mview\\ActionInterface as MviewActionInterface; use Divante\\VsbridgeIndexerCore\\Indexer\\GenericIndexerHandler as IndexerHandler; use RSHB\\WhiteRabbit\\Model\\Indexer\\Action\\WhiteRabbit as WhiteRabbitAction;  \/**  * Class WhiteRabbit  * @package RSHB\\WhiteRabbit\\Model\\Indexer  *\/ class WhiteRabbit implements IndexerActionInterface, MviewActionInterface {     \/**      * @var IndexerHandler      *\/     private $indexHandler;      \/**      * @var WhiteRabbitAction      *\/     private $WhiteRabbitAction;      \/**      * @var StoreManager      *\/     private $storeManager;      \/**      * WhiteRabbit constructor.      * @param IndexerHandler $indexerHandler      * @param WhiteRabbitAction $action      * @param StoreManager $storeManager      *\/     public function __construct(         IndexerHandler $indexerHandler,         WhiteRabbitAction $action,         StoreManager $storeManager     ) {         $this-&gt;indexHandler = $indexerHandler;         $this-&gt;whiteRabbitAction = $action;         $this-&gt;storeManager = $storeManager;     }      \/**      * @inheritdoc      * @throws Exception      *\/     public function execute($ids)     {         $stores = $this-&gt;storeManager-&gt;getStores();          foreach ($stores as $store) {             $this-&gt;indexHandler-&gt;saveIndex($this-&gt;whiteRabbitAction-&gt;rebuild($ids), $store);             $this-&gt;indexHandler-&gt;cleanUpByTransactionKey($store, $ids);         }     }      \/**      * @inheritdoc      * @throws Exception      *\/     public function executeFull()     {         $stores = $this-&gt;storeManager-&gt;getStores();         foreach ($stores as $store) {             $this-&gt;indexHandler-&gt;saveIndex($this-&gt;whiteRabbitAction-&gt;rebuild(), $store);             $this-&gt;indexHandler-&gt;cleanUpByTransactionKey($store);         }     }      \/**      * @inheritdoc      * @throws Exception      *\/     public function executeList(array $ids)     {         $this-&gt;execute($ids);     }      \/**      * @inheritdoc      * @throws Exception      *\/     public function executeRow($id)     {         $this-&gt;execute([$id]);     } }<\/code><\/pre>\n<p>  <\/p>\n<p><em>Model\/Indexer\/WhiteRabbit.php<\/em><\/p>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php namespace RSHB\\WhiteRabbit\\Index\\Mapping;  use Divante\\VsbridgeIndexerCore\\Api\\Mapping\\FieldInterface; use Divante\\VsbridgeIndexerCore\\Api\\MappingInterface; use Magento\\Framework\\DataObject; use Magento\\Framework\\Event\\ManagerInterface as EventManager;  \/**  * Class WhiteRabbit  * @package RSHB\\WhiteRabbit\\Index\\Mapping  *\/ class WhiteRabbit implements MappingInterface {     \/**      * @var EventManager      *\/     private $eventManager;      \/**      * WhiteRabbit constructor.      * @param EventManager $eventManager      *\/     public function __construct(         EventManager $eventManager     ) {         $this-&gt;eventManager = $eventManager;     }      \/**      * @inheritdoc      *\/     public function getMappingProperties()     {         $properties = [             'id' =&gt; ['type' =&gt; FieldInterface::TYPE_LONG]         ];          $mappingObject = new DataObject();         $mappingObject-&gt;setData('properties', $properties);          $this-&gt;eventManager-&gt;dispatch(             'elasticsearch_white_rabbit_mapping_properties',             ['mapping' =&gt; $mappingObject]         );          return $mappingObject-&gt;getData();     } }<\/code><\/pre>\n<p>  <\/p>\n<p><em>Index\/Mapping\/WhiteRabbit.php<\/em><\/p>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php namespace RSHB\\WhiteRabbit\\Model\\Indexer\\Action;  use RSHB\\WhiteRabbit\\Model\\ResourceModel\\WhiteRabbit as WhiteRabbitResource; use Traversable;  \/**  * Class WhiteRabbit  * @package RSHB\\WhiteRabbit\\Model\\Indexer\\Action  *\/ class WhiteRabbit {     \/**      * @var WhiteRabbitResource      *\/     private $resourceModel;      public function __construct(         WhiteRabbitResource $resourceModel     ) {         $this-&gt;resourceModel = $resourceModel;     }      \/**      * Rebuild      *      * @param array $ids      * @return Traversable      *\/     public function rebuild(array $ids = [])     {         $lastId = 0;          do {             $rabbits = $this-&gt;resourceModel-&gt;load($ids, $lastId);              foreach ($rabbits as $rabbit) {                 $lastId = (int)$rabbit['id'];                 $rabbitData['id'] = $lastId;                 $rabbitData = $rabbit;                  yield $lastId =&gt; $rabbitData;             }         } while (!empty($rabbits));     } }<\/code><\/pre>\n<p>  <\/p>\n<p><em>Model\/Indexer\/Action\/WhiteRabbit.php<\/em><\/p>\n<p>  <\/p>\n<p>\u0410 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php namespace RSHB\\WhiteRabbit\\Model\\ResourceModel;  use Magento\\Framework\\App\\ResourceConnection;  use Magento\\Framework\\DB\\Adapter\\AdapterInterface;  \/**  * Class WhiteRabbit  * @package RSHB\\WhiteRabbit\\Model\\ResourceModel  *\/ class WhiteRabbit {     \/**      * @var ResourceConnection      *\/     private $resource;      \/**      * Organization constructor.      * @param ResourceConnection $resourceConnection      *\/     public function __construct(         ResourceConnection $resourceConnection     ) {         $this-&gt;resource = $resourceConnection;     }      \/**      * @param array $ids      * @param int $fromId      * @param int $limit      * @return array      *\/         public function load($ids, $fromId, $limit = 1000)     {         $select = $this-&gt;getConnection()-&gt;select()-&gt;from('rshb_white_rabbit');          if (!empty($ids)) {             $select-&gt;where('id IN (?)', $ids);         }          $select-&gt;where('id &gt; ?', $fromId)             -&gt;order('id')             -&gt;limit($limit);          return $this-&gt;getConnection()-&gt;fetchAll($select);     }      \/**      * @return AdapterInterface      *\/     private function getConnection()     {         return $this-&gt;resource-&gt;getConnection();     } }<\/code><\/pre>\n<p>  <\/p>\n<p><em>Model\/ResourceModel\/WhiteRabbit.php<\/em><\/p>\n<p>  <\/p>\n<p>\u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0438\u043d\u0434\u0435\u043a\u0441\u0430 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0430 IndexerHandler, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c \u0442\u0438\u043f\u043e\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"xml\">... &lt;virtualType name=&quot;RSHB\\WhiteRabbit\\Indexer\\WhiteRabbitIndexOperationsVirtual&quot;              type=&quot;Divante\\VsbridgeIndexerCore\\Indexer\\GenericIndexerHandler&quot;&gt;     &lt;arguments&gt;         &lt;argument name=&quot;indexIdentifier&quot; xsi:type=&quot;string&quot;&gt;white_rabbit&lt;\/argument&gt;         &lt;argument name=&quot;typeName&quot; xsi:type=&quot;string&quot;&gt;white_rabbit&lt;\/argument&gt;         &lt;argument name=&quot;alias&quot; xsi:type=&quot;string&quot;&gt;vue_storefront_white_rabbit&lt;\/argument&gt;     &lt;\/arguments&gt; &lt;\/virtualType&gt;  &lt;type name=&quot;RSHB\\WhiteRabbit\\Model\\Indexer\\WhiteRabbit&quot;&gt;     &lt;arguments&gt;         &lt;argument name=&quot;indexerHandler&quot; xsi:type=&quot;object&quot;&gt;             RSHB\\WhiteRabbit\\Indexer\\WhiteRabbitIndexOperationsVirtual         &lt;\/argument&gt;     &lt;\/arguments&gt; &lt;\/type&gt; ...<\/code><\/pre>\n<p>  <\/p>\n<p><em>etc\/di.xml<\/em><\/p>\n<p>  <\/p>\n<p>\u0418, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0448\u0442\u0440\u0438\u0445\u0430, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0434\u0430\u0442\u0430 \u043f\u0430\u0442\u0447, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043a\u043b\u044e\u0447\u0438\u0442 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440\u0430 \u0440\u0435\u0436\u0438\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u043f\u043e \u043a\u0440\u043e\u043d\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"php\">&lt;?php namespace RSHB\\WhiteRabbit\\Setup\\Patch\\Data;  use Exception; use Magento\\Framework\\Indexer\\IndexerRegistry; use Magento\\Framework\\Setup\\Patch\\DataPatchInterface; use Psr\\Log\\LoggerInterface;  \/**  * Class SetWhiteRabbitIndexerScheduleMode  * @package RSHB\\WhiteRabbit\\Setup\\Patch\\Data  *\/ class SetWhiteRabbitIndexerScheduleMode implements DataPatchInterface {     \/**      * @var LoggerInterface      *\/     private $logger;      \/**      * @var IndexerRegistry      *\/     private $indexerRegistry;      \/**      * SetWhiteRabbitIndexerScheduleMode constructor.      * @param LoggerInterface $logger      * @param IndexerRegistry $indexerRegistry      *\/     public function __construct(         LoggerInterface $logger,         IndexerRegistry $indexerRegistry     ) {         $this-&gt;logger = $logger;         $this-&gt;indexerRegistry = $indexerRegistry;     }      \/**      * @return DataPatchInterface|void      *\/     public function apply()     {         try {             $indexer = $this-&gt;indexerRegistry-&gt;get('vsbridge_white_rabbit_indexer');             $indexer-&gt;setScheduled(true);         } catch (Exception $e) {             $this-&gt;logger-&gt;critical($e);         }     }      \/**      * @inheritDoc      *\/     public static function getDependencies()     {         return [];     }      \/**      * @inheritDoc      *\/     public function getAliases()     {         return [];     } }<\/code><\/pre>\n<p>  <\/p>\n<p><em>Setup\/Patch\/Data\/SetWhiteRabbitIndexerScheduleMode.php<\/em><\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043d\u0430\u0448 \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440 \u0433\u043e\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<h2 id=\"podvedenie-itogov\">\u041f\u043e\u0434\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438\u0442\u043e\u0433\u043e\u0432<\/h2>\n<p>  <\/p>\n<p>\u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c M2 \u0438 VS \u0430\u0432\u0442\u043e\u043d\u043e\u043c\u043d\u043e, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044f \u0441\u043b\u0430\u0431\u0443\u044e \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0438, \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0435, \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u0435 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u0413\u0438\u0431\u043a\u0438\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c elasticsearch \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0444\u043e\u043d\u0442\u0435\u043d\u0434\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0431\u044b\u0441\u0442\u0440\u043e.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0437\u0430\u043e\u0441\u0442\u0440\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u044e\u0430\u043d\u0441\u0430\u0445 \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440\u043e\u0432, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u044b \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u0438\u0441\u044c \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0415\u0441\u043b\u0438 \u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0431\u043e\u0440 \u043f\u043e\u043b\u0435\u0439 \u0438\u043b\u0438 \u0438\u0445 \u0442\u0438\u043f\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441 \u0438\u0437 ealasticsearch \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u0443\u044e \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044e. \u042d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0435 \u043d\u0435\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f \u0442\u0438\u043f\u043e\u0432 \u043f\u043e\u043b\u0435\u0439 \u043d\u043e\u0432\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0441 \u0442\u0435\u043c\u0438, \u0447\u0442\u043e \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u0435;<\/li>\n<li>\u0418\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044f \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0434\u0430\u043c\u043f\u0430. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u044e \u0432\u0440\u0443\u0447\u043d\u0443\u044e;<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u0446\u0438\u0438 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 elasticsearch \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 (\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f foreign \u043a\u043b\u044e\u0447 \u0432 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 join`\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b) \u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0442\u044c \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u0435 \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u0443\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443 ID \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0438\u0441\u044c \u0434\u0430\u043d\u043d\u044b\u0435, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 foreign \u043a\u043b\u044e\u0447\u0430\u043c\u0438.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0435. \u041f\u0438\u0448\u0438\u0442\u0435 \u043a\u043e\u0434 \u0441 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438 \u0434\u0430 \u043f\u0440\u0435\u0431\u0443\u0434\u0435\u0442 \u0441 \u0432\u0430\u043c\u0438 \u0441\u0438\u043b\u0430.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/rshb\/blog\/521692\/\"> https:\/\/habr.com\/ru\/company\/rshb\/blog\/521692\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/rshb\/blog\/521692\/\">\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ot\/_j\/as\/ot_jaskbktt1qcllsm3fxgziujw.png\"><\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041f\u0430\u0432\u0435\u043b \u0438 \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0441\u044c \u0431\u044d\u043a\u0435\u043d\u0434 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439. \u041a\u0430\u043a \u0443\u0436\u0435 \u043f\u0438\u0441\u0430\u043b <a href=\"https:\/\/habr.com\/ru\/users\/andreyhabr\/\" class=\"user_link\">AndreyHabr<\/a>, \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u0441\u0442\u0435\u043a\u0435 <a href=\"https:\/\/magento.com\/\">Adobe Magento 2<\/a> (\u0434\u043b\u044f \u043a\u0440\u0430\u0442\u043a\u043e\u0441\u0442\u0438 \u0434\u0430\u043b\u0435\u0435 \u044f \u0431\u0443\u0434\u0443 \u043d\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0435 M2) \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0431\u044d\u043a\u0435\u043d\u0434\u0430 \u0438 <a href=\"https:\/\/www.vuestorefront.io\/\">Vue Storefront<\/a> (VS) \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0440\u043e\u043d\u0442\u0435\u043d\u0434\u0430.<\/p>\n<p>  <\/p>\n<p>\u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 \u0441\u0442\u0435\u043a\u0430 VS\/M2 \u2014 \u043c\u044b \u0443\u0436\u0435 <a href=\"https:\/\/habr.com\/ru\/company\/rshb\/blog\/518746\/\">\u043f\u0438\u0441\u0430\u043b\u0438<\/a> \u043e\u0431 \u044d\u0442\u043e\u043c \u0440\u0430\u043d\u0435\u0435. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u043e\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0438\u0436\u0435.<\/p>\n<p>  <\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0438 \u0441 VS \u0438\u0437\u043d\u0443\u0442\u0440\u0438 M2: \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440\u043e\u0432, \u043e\u0431\u0441\u0443\u0434\u0438\u043c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u044b, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u044f \u043a\u0440\u0430\u0442\u043a\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0438\u043d\u0434\u0435\u043a\u0441\u0435\u0440 \u0434\u043b\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438. <\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0433\u043d\u0430\u043b\u0438!<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-310961","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/310961","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=310961"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/310961\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=310961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=310961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=310961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}