ltsecurityinc安防产品在线商城代码
This commit is contained in:
Executable
+30
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Elastic Search Base for Magento 2
|
||||
*/-->
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
|
||||
<acl>
|
||||
<resources>
|
||||
<resource id="Magento_Backend::admin">
|
||||
<resource id="Magento_Backend::stores">
|
||||
<resource id="Magento_Backend::stores_settings">
|
||||
<resource id="Magento_Config::config">
|
||||
<resource id="Amasty_ElasticSearch::config" title="Elastic Search" sortOrder="11319" />
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
<resource id="Magento_Backend::system">
|
||||
<resource id="Amasty_ElasticSearch::Amasty_ElasticSearch" title="Amasty ElasticSearch" sortOrder="100">
|
||||
<resource id="Amasty_ElasticSearch::stop_words" title="Manage Stop Words" sortOrder="10" />
|
||||
<resource id="Amasty_ElasticSearch::synonym" title="Manage Synonyms" sortOrder="20" />
|
||||
<resource id="Amasty_ElasticSearch::relevance_rules" title="Relevance Rules" sortOrder="30" />
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
</resources>
|
||||
</acl>
|
||||
</config>
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Elastic Search Base for Magento 2
|
||||
*/-->
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
|
||||
<type name="Magento\Backend\Model\Menu\Item">
|
||||
<plugin name="Amasty_ElasticSearch::correct-configuration-url" type="Amasty\ElasticSearch\Plugin\Backend\Model\Menu\Item" />
|
||||
</type>
|
||||
<type name="Magento\Config\Model\Config">
|
||||
<plugin name="amasty_system_config_save_plugin" type="Amasty\ElasticSearch\Plugin\Config\Model\Config"/>
|
||||
</type>
|
||||
<type name="Magento\Catalog\Model\Category">
|
||||
<plugin name="Amasty_ElasticSearch::apply_relelevance_rule_after_products_assign" type="Amasty\ElasticSearch\Plugin\Catalog\Model\CategoryPlugin"/>
|
||||
</type>
|
||||
<type name="Magento\Catalog\Model\ResourceModel\Product">
|
||||
<plugin name="Amasty_ElasticSearch::apply_relevance_rules_after_product_save" type="Amasty\ElasticSearch\Plugin\Catalog\Model\ResourceModel\Product"/>
|
||||
</type>
|
||||
<type name="Magento\Store\Model\Website">
|
||||
<plugin name="Amasty_ElasticSearch::reindex_after_delete_website" type="Amasty\ElasticSearch\Plugin\Store\Model\WebsitePlugin"/>
|
||||
</type>
|
||||
<type name="Magento\Catalog\Model\ResourceModel\Eav\Attribute">
|
||||
<plugin name="Amasty_ElasticSearch::change_product_attribute" type="Amasty\ElasticSearch\Plugin\Catalog\Model\ResourceModel\EavAttribute"/>
|
||||
</type>
|
||||
<!-- rewrite plugin to keep configurable products -->
|
||||
<type name="Magento\CatalogRule\Model\Rule">
|
||||
<plugin name="addVariationsToProductRule" type="Amasty\ElasticSearch\Plugin\CatalogRuleConfigurable\ConfigurableProductHandler"/>
|
||||
</type>
|
||||
|
||||
<type name="Amasty\ElasticSearch\Block\Adminhtml\Form\Field\QuerySettings">
|
||||
<arguments>
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="fulltext_attributes" xsi:type="object">Amasty\ElasticSearch\Model\Source\FulltextAttributes</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<!-- for cloud instances -->
|
||||
<type name="Magento\Framework\Notification\MessageList">
|
||||
<arguments>
|
||||
<argument name="messages" xsi:type="array">
|
||||
<item name="hardcoded_search_engine" xsi:type="string">Amasty\ElasticSearch\Model\Message\HardcodedEngine</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<virtualType name="Amasty\ElasticSearch\Ui\DataProvider\Product\Listing\DataProvider" type="Magento\Catalog\Ui\DataProvider\Product\ProductDataProvider">
|
||||
<arguments>
|
||||
<argument name="addFilterStrategies" xsi:type="array">
|
||||
<item name="elastic_rule_condition" xsi:type="object">Amasty\ElasticSearch\Ui\RelevanceRule\DataProvider\Product\Filter\RuleConditionFilter</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
</config>
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Elastic Search Base for Magento 2
|
||||
*/-->
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
|
||||
<event name="admin_system_config_changed_section_catalog">
|
||||
<observer name="Amasty_ElasticSearch::save_catalog"
|
||||
instance="Amasty\ElasticSearch\Observer\System\ConfigChanged"/>
|
||||
</event>
|
||||
<event name="admin_system_config_changed_section_amasty_elastic">
|
||||
<observer name="Amasty_ElasticSearch::save_amasty_elastic"
|
||||
instance="Amasty\ElasticSearch\Observer\System\ConfigChanged"/>
|
||||
</event>
|
||||
</config>
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Elastic Search Base for Magento 2
|
||||
*/-->
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
|
||||
<menu>
|
||||
<add id="Amasty_ElasticSearch::Amasty_ElasticSearch"
|
||||
title="Amasty ElasticSearch"
|
||||
module="Amasty_ElasticSearch"
|
||||
parent="Magento_Backend::system"
|
||||
sortOrder="80"
|
||||
resource="Amasty_ElasticSearch::Amasty_ElasticSearch"
|
||||
/>
|
||||
<add id="Amasty_ElasticSearch::stop_words"
|
||||
title="Manage Stop Words"
|
||||
module="Amasty_ElasticSearch"
|
||||
parent="Amasty_ElasticSearch::Amasty_ElasticSearch"
|
||||
sortOrder="10"
|
||||
action="amasty_elastic/stopword/index"
|
||||
resource="Amasty_ElasticSearch::stop_words"
|
||||
/>
|
||||
<add id="Amasty_ElasticSearch::synonym"
|
||||
title="Manage Synonyms"
|
||||
module="Amasty_ElasticSearch"
|
||||
parent="Amasty_ElasticSearch::Amasty_ElasticSearch"
|
||||
sortOrder="20"
|
||||
action="amasty_elastic/synonym/index"
|
||||
resource="Amasty_ElasticSearch::synonym"
|
||||
/>
|
||||
<add id="Amasty_ElasticSearch::relevance_rules"
|
||||
title="Search Page Relevance Rules"
|
||||
module="Amasty_ElasticSearch"
|
||||
parent="Amasty_ElasticSearch::Amasty_ElasticSearch"
|
||||
sortOrder="20"
|
||||
action="amasty_elastic/relevancerule/index"
|
||||
resource="Amasty_ElasticSearch::relevance_rules"
|
||||
/>
|
||||
<add id="Amasty_ElasticSearch::settings"
|
||||
title="Configuration"
|
||||
module="Amasty_ElasticSearch"
|
||||
sortOrder="100"
|
||||
parent="Amasty_ElasticSearch::Amasty_ElasticSearch"
|
||||
action="adminhtml/system_config/edit/"
|
||||
resource="Amasty_ElasticSearch::config"
|
||||
/>
|
||||
</menu>
|
||||
</config>
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Elastic Search Base for Magento 2
|
||||
*/-->
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
|
||||
<router id="admin">
|
||||
<route id="amasty_elastic" frontName="amasty_elastic">
|
||||
<module name="Amasty_ElasticSearch" />
|
||||
</route>
|
||||
</router>
|
||||
</config>
|
||||
+270
@@ -0,0 +1,270 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Elastic Search Base for Magento 2
|
||||
*/-->
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
|
||||
<system>
|
||||
<section id="amasty_elastic" translate="label" type="text" sortOrder="51219" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<resource>Amasty_ElasticSearch::config</resource>
|
||||
<class>separator-top</class>
|
||||
<label>Elastic Search</label>
|
||||
<tab>amasty</tab>
|
||||
<group id="connection" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Connection</label>
|
||||
<field id="engine" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Search Engine</label>
|
||||
<source_model>Magento\Search\Model\Adminhtml\System\Config\Source\Engine</source_model>
|
||||
<tooltip><![CDATA[<img src="Amasty_ElasticSearch::images/scheme.png">]]></tooltip>
|
||||
</field>
|
||||
<field id="server_hostname" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Elasticsearch Server Hostname</label>
|
||||
<depends>
|
||||
<field id="engine" separator=",">amasty_elastic,amasty_elastic_8,amasty_elastic_opensearch</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="server_port" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Elasticsearch Server Port</label>
|
||||
<validate>validate-greater-than-zero</validate>
|
||||
<depends>
|
||||
<field id="engine" separator=",">amasty_elastic,amasty_elastic_8,amasty_elastic_opensearch</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="index_prefix" translate="label" type="text" sortOrder="63" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Elasticsearch Index Prefix</label>
|
||||
<depends>
|
||||
<field id="engine" separator=",">amasty_elastic,amasty_elastic_8,amasty_elastic_opensearch</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="enable_auth" translate="label" type="select" sortOrder="64" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Enable Elasticsearch HTTP Auth</label>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
<depends>
|
||||
<field id="engine" separator=",">amasty_elastic,amasty_elastic_8,amasty_elastic_opensearch</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="username" translate="label" type="text" sortOrder="65" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Elasticsearch HTTP Username</label>
|
||||
<depends>
|
||||
<field id="engine" separator=",">amasty_elastic,amasty_elastic_8,amasty_elastic_opensearch</field>
|
||||
<field id="enable_auth">1</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="password" translate="label" type="password" sortOrder="66" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Elasticsearch HTTP Password</label>
|
||||
<depends>
|
||||
<field id="engine" separator=",">amasty_elastic,amasty_elastic_8,amasty_elastic_opensearch</field>
|
||||
<field id="enable_auth">1</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="server_timeout" translate="label" type="text" sortOrder="67" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Elasticsearch Server Timeout</label>
|
||||
<validate>validate-greater-than-zero</validate>
|
||||
<depends>
|
||||
<field id="engine" separator=",">amasty_elastic,amasty_elastic_8,amasty_elastic_opensearch</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="custom_analyzer" translate="label" type="select" sortOrder="70" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Custom Analyzer</label>
|
||||
<source_model>Amasty\ElasticSearch\Model\Source\CustomAnalyzer</source_model>
|
||||
<depends>
|
||||
<field id="engine" separator=",">amasty_elastic,amasty_elastic_8,amasty_elastic_opensearch</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="test_connect" translate="button_label" sortOrder="100" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label/>
|
||||
<button_label>Test Connection</button_label>
|
||||
<frontend_model>Amasty\ElasticSearch\Block\Adminhtml\System\Config\ConnectionChecker</frontend_model>
|
||||
<depends>
|
||||
<field id="engine" separator=",">amasty_elastic,amasty_elastic_8,amasty_elastic_opensearch</field>
|
||||
</depends>
|
||||
</field>
|
||||
</group>
|
||||
<group id="catalog" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" >
|
||||
<label>Catalog</label>
|
||||
<depends>
|
||||
<field id="*/connection/engine" separator=",">amasty_elastic,amasty_elastic_8,amasty_elastic_opensearch</field>
|
||||
</depends>
|
||||
<field id="wildcard_mode" translate="label,comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Wildcard Type</label>
|
||||
<comment>Specify the type of the autocomplete suggestion - the part of a word which will be auto-completed. Shoppers can input a half-finished word and get a relevant result.</comment>
|
||||
<source_model>Amasty\ElasticSearch\Model\Source\WildcardMode</source_model>
|
||||
<depends>
|
||||
<field id="*/connection/custom_analyzer">disabled</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="wildcard_symbols" translate="label,comment" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
|
||||
<label>Enable Wildcard After</label>
|
||||
<validate>validate-greater-than-zero</validate>
|
||||
<comment>Specify a number of symbols to apply autocomplete suggestion after.</comment>
|
||||
<depends>
|
||||
<field id="*/connection/custom_analyzer">disabled</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="spellcorrection_symbols" translate="label,comment" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
|
||||
<label>Enable Spell Correction After</label>
|
||||
<validate>validate-greater-than-zero</validate>
|
||||
<comment>Specify a number of symbols to apply spell correction after.</comment>
|
||||
<depends>
|
||||
<field id="*/connection/custom_analyzer">disabled</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="long_tail" translate="label" type="select" sortOrder="1000" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Allow Special Characters</label>
|
||||
<comment>Useful when customer uses a highly specific search phrase and words that contain slashes, hyphens, dashes or any other non-alphabetic symbols.</comment>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
<backend_model>Amasty\ElasticSearch\Model\Adminhtml\System\Config\Backend\LongTail</backend_model>
|
||||
<depends>
|
||||
<field id="*/connection/custom_analyzer">disabled</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="allow_further_query" translate="label comment" type="select" sortOrder="1005"
|
||||
showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Allow to Search Within Results (Desktop)</label>
|
||||
<comment>Additional search field will be added to the search results page.</comment>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
</field>
|
||||
<field id="query_settings" translate="label,comment" sortOrder="1010" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Search Query Settings</label>
|
||||
<frontend_model>Amasty\ElasticSearch\Block\Adminhtml\Form\Field\QuerySettings</frontend_model>
|
||||
<backend_model>Amasty\ElasticSearch\Model\Config\QuerySettings</backend_model>
|
||||
<comment><![CDATA[Specify the search type preferences for each product attribute. Please consult the <a href="https://amasty.com/docs/doku.php?id=magento_2:elastic_search#advanced_query_settings">user guide</a>.]]></comment>
|
||||
<tooltip><![CDATA[<b>Wildcard</b> allows shoppers to input a half-finished word and get a relevant result.<br/>
|
||||
<b>Spell Correction</b> enables automatic spelling correction.<br/>
|
||||
Please note that enabling this function may affect the synonyms operation and they may not work correctly.<br/>
|
||||
<b>Match Mode</b> is about how the words are combined in a search query.<br/>
|
||||
Please note that Wildcard and Spell Correction are not able to work at the same time.<br/>]]></tooltip>
|
||||
|
||||
</field>
|
||||
</group>
|
||||
<group id="index" translate="label" type="text" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<depends>
|
||||
<field id="*/connection/engine" separator=",">amasty_elastic,amasty_elastic_8,amasty_elastic_opensearch</field>
|
||||
<field id="*/connection/custom_analyzer" separator=",">disabled,kuromoji,nori</field>
|
||||
</depends>
|
||||
<label>Indexation Settings</label>
|
||||
<field id="char_mapping" translate="label tooltip" type="textarea" sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Char Mapping</label>
|
||||
<comment><![CDATA[Mappings are used to convert a specified string of characters to specified value.]]></comment>
|
||||
<tooltip><![CDATA[<div>The format of mapping: {key} => {value}</div><div>Enter one mapping per line. Note: the longest match is of higher priority.</div>E.g.:<ul style="margin-left: 5px; list-style-type: none;"><li>& => and</li><li>é => eh</li><li>oé => oe</li></ul>(in this case Chloé and Dolce & Gabbana search queries will be replaced with Chloe and Dolce and Gabbana upon searching).]]></tooltip>
|
||||
<depends>
|
||||
<field id="*/connection/custom_analyzer" separator=",">disabled</field>
|
||||
</depends>
|
||||
<validate>amasty-validate-char-mapping</validate>
|
||||
</field>
|
||||
<field id="use_language_stopwords" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Use Inbox Stopwords</label>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
<depends>
|
||||
<field id="*/connection/custom_analyzer" separator=",">disabled,kuromoji</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="stopwords_language" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Language</label>
|
||||
<source_model>Amasty\ElasticSearch\Model\Source\ElasticLanguage</source_model>
|
||||
<depends>
|
||||
<field id="use_language_stopwords">1</field>
|
||||
<field id="*/connection/custom_analyzer">disabled</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="use_language_stemmed_words" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Use Inbox Stemming</label>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
<depends>
|
||||
<field id="*/connection/custom_analyzer" separator=",">disabled,kuromoji</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="stemmed_words_language" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Language</label>
|
||||
<source_model>Amasty\ElasticSearch\Model\Source\ElasticLanguage</source_model>
|
||||
<depends>
|
||||
<field id="use_language_stemmed_words">1</field>
|
||||
<field id="*/connection/custom_analyzer">disabled</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="kuromoji_token_mode" translate="label,comment" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Indexation Mode</label>
|
||||
<comment>Setting determines how engine handles compound and unknown words under indexation</comment>
|
||||
<source_model>Amasty\ElasticSearch\Model\Source\KuromojiTokenMode</source_model>
|
||||
<depends>
|
||||
<field id="*/connection/custom_analyzer">kuromoji</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="use_kuromoji_reading_form" translate="label,comment" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Use Reading Form</label>
|
||||
<comment>Setting replaces words with its reading form in either katakana or romaji</comment>
|
||||
<source_model>Amasty\ElasticSearch\Model\Source\KuromojiReadingForm</source_model>
|
||||
<depends>
|
||||
<field id="*/connection/custom_analyzer">kuromoji</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="nori_token_mode" translate="label,comment" type="select" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Indexation Mode</label>
|
||||
<comment>Setting determines how engine handles compound and unknown words under indexation</comment>
|
||||
<source_model>Amasty\ElasticSearch\Model\Source\NoriTokenMode</source_model>
|
||||
<depends>
|
||||
<field id="*/connection/custom_analyzer">nori</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="use_nori_reading_form" translate="label,comment" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="1">
|
||||
<label>Use Reading Form</label>
|
||||
<comment>Setting rewrites words written in Hanja to their Hangul form</comment>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
<depends>
|
||||
<field id="*/connection/custom_analyzer">nori</field>
|
||||
</depends>
|
||||
</field>
|
||||
</group>
|
||||
<group id="debug" translate="label" type="text" sortOrder="100" showInDefault="1" showInWebsite="0"
|
||||
showInStore="0">
|
||||
<depends>
|
||||
<field id="*/connection/engine" separator=",">amasty_elastic,amasty_elastic_8,amasty_elastic_opensearch</field>
|
||||
</depends>
|
||||
<label>Debug Settings</label>
|
||||
<field id="use_debug" translate="label" type="select" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Is Debug Active</label>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
<backend_model>Amasty\ElasticSearch\Model\Config\Backend\Debug</backend_model>
|
||||
</field>
|
||||
<field id="log_buckets_alert_requests" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Log Requests for Bucket Alerts</label>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
<depends>
|
||||
<field id="use_debug">1</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="log_request_object" translate="label" type="select" sortOrder="30" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Log Request Object</label>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
<depends>
|
||||
<field id="use_debug">1</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="log_raw_request" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Log Raw Request</label>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
<depends>
|
||||
<field id="use_debug">1</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="log_raw_response" translate="label" type="select" sortOrder="50" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Log Raw Response</label>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
<depends>
|
||||
<field id="use_debug">1</field>
|
||||
</depends>
|
||||
</field>
|
||||
<field id="log_response_object" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="0" showInStore="0">
|
||||
<label>Log Response Object</label>
|
||||
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
|
||||
<depends>
|
||||
<field id="use_debug">1</field>
|
||||
</depends>
|
||||
</field>
|
||||
</group>
|
||||
</section>
|
||||
</system>
|
||||
</config>
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Elastic Search Base for Magento 2
|
||||
*/-->
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
|
||||
<default>
|
||||
<amasty_elastic>
|
||||
<connection>
|
||||
<server_hostname>localhost</server_hostname>
|
||||
<server_port>9200</server_port>
|
||||
<index_prefix>magento2</index_prefix>
|
||||
<enable_auth>0</enable_auth>
|
||||
<server_timeout>15</server_timeout>
|
||||
<custom_analyzer>disabled</custom_analyzer>
|
||||
</connection>
|
||||
<catalog>
|
||||
<wildcard>1</wildcard>
|
||||
<wildcard_symbols>3</wildcard_symbols>
|
||||
<spellcorrection_symbols>4</spellcorrection_symbols>
|
||||
<allow_further_query>0</allow_further_query>
|
||||
</catalog>
|
||||
</amasty_elastic>
|
||||
</default>
|
||||
</config>
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Elastic Search Base for Magento 2
|
||||
*/-->
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
|
||||
<group id="default">
|
||||
<job name="amasty_relevance_rule_apply_all" instance="Amasty\ElasticSearch\Cron\RelevanceRuleDailyUpdate" method="execute">
|
||||
<schedule>1 0 * * *</schedule>
|
||||
</job>
|
||||
</group>
|
||||
</config>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Elastic Search Base for Magento 2
|
||||
*/-->
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
|
||||
<!-- rewrite plugin to keep configurable products -->
|
||||
<type name="Magento\CatalogRule\Model\Rule">
|
||||
<plugin name="addVariationsToProductRule" type="Amasty\ElasticSearch\Plugin\CatalogRuleConfigurable\ConfigurableProductHandler"/>
|
||||
</type>
|
||||
</config>
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Elastic Search Base for Magento 2
|
||||
*/-->
|
||||
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
|
||||
<table name="amasty_elastic_synonym" resource="default" engine="innodb" comment="Terms and Synonyms Data">
|
||||
<column xsi:type="int" name="synonym_id" padding="10" unsigned="true" nullable="false" identity="true"
|
||||
comment="Synonym Id"/>
|
||||
<column xsi:type="int" name="store_id" padding="11" unsigned="false" nullable="false" identity="false"
|
||||
comment="Store Id"/>
|
||||
<column xsi:type="varchar" name="term" nullable="false" length="255" comment="Term"/>
|
||||
|
||||
<constraint xsi:type="primary" referenceId="PRIMARY">
|
||||
<column name="synonym_id"/>
|
||||
</constraint>
|
||||
|
||||
<constraint xsi:type="unique" referenceId="AMASTY_ELASTIC_SYNONYM_TERM_STORE_ID">
|
||||
<column name="term"/>
|
||||
<column name="store_id"/>
|
||||
</constraint>
|
||||
<index referenceId="AMASTY_ELASTIC_SYNONYM_TERM" indexType="btree">
|
||||
<column name="term"/>
|
||||
</index>
|
||||
</table>
|
||||
|
||||
<table name="amasty_elastic_stop_word" resource="default" engine="innodb" comment="Stop Words Data">
|
||||
<column xsi:type="int" name="stop_word_id" padding="10" unsigned="true" nullable="false" identity="true"
|
||||
comment="Stop Word Id"/>
|
||||
<column xsi:type="varchar" name="term" nullable="false" length="255" comment="Stop Word"/>
|
||||
<column xsi:type="int" name="store_id" padding="11" unsigned="false" nullable="false" identity="false"
|
||||
comment="Store Id"/>
|
||||
|
||||
<constraint xsi:type="primary" referenceId="PRIMARY">
|
||||
<column name="stop_word_id"/>
|
||||
</constraint>
|
||||
|
||||
<constraint xsi:type="unique" referenceId="AMASTY_ELASTIC_STOP_WORD_TERM_STORE_ID">
|
||||
<column name="term"/>
|
||||
<column name="store_id"/>
|
||||
</constraint>
|
||||
<index referenceId="AMASTY_ELASTIC_STOP_WORD_TERM" indexType="btree">
|
||||
<column name="term"/>
|
||||
</index>
|
||||
</table>
|
||||
|
||||
<table name="amasty_elastic_relevance_rule" resource="default" engine="innodb" comment="Relevance Rules">
|
||||
<column xsi:type="smallint" name="rule_id" padding="5" unsigned="true" nullable="false" identity="true"
|
||||
comment="Relevance Rule Id"/>
|
||||
<column xsi:type="boolean" name="is_enabled" nullable="false" default="true" comment="Is Rule Enabled"/>
|
||||
<column xsi:type="varchar" name="title" nullable="false" length="255" comment="Rule Title"/>
|
||||
<column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
|
||||
comment="Website Id"/>
|
||||
<column xsi:type="date" name="from_date" comment="Is Enabled From Date"/>
|
||||
<column xsi:type="date" name="to_date" comment="Is Enabled to Date"/>
|
||||
<column xsi:type="smallint" name="multiplier" padding="6" unsigned="false" nullable="false" identity="false"
|
||||
default="1" comment="Relevance Multiplier"/>
|
||||
<column xsi:type="text" name="conditions_serialized" nullable="true" comment="Relevance Rule Conditions"/>
|
||||
|
||||
<constraint xsi:type="primary" referenceId="PRIMARY">
|
||||
<column name="rule_id"/>
|
||||
</constraint>
|
||||
|
||||
<constraint
|
||||
xsi:type="foreign"
|
||||
referenceId="AMASTY_ELASTIC_RELEVANCE_RULE_WS_ID_STORE_WS_WS_ID"
|
||||
table="amasty_elastic_relevance_rule"
|
||||
column="website_id"
|
||||
referenceTable="store_website"
|
||||
referenceColumn="website_id"
|
||||
onDelete="CASCADE"
|
||||
/>
|
||||
|
||||
<index referenceId="AMASTY_ELASTIC_RELEVANCE_RULE_IS_ENABLED" indexType="btree">
|
||||
<column name="is_enabled"/>
|
||||
</index>
|
||||
<index referenceId="AMASTY_ELASTIC_RELEVANCE_RULE_WEBSITE_ID" indexType="btree">
|
||||
<column name="website_id"/>
|
||||
</index>
|
||||
</table>
|
||||
|
||||
<table name="amasty_elastic_relevance_rule_index_tmp" resource="default" engine="innodb"
|
||||
comment="Relevance Rule Product">
|
||||
<column xsi:type="int" name="rule_id" padding="10" unsigned="true" nullable="false" identity="false" default="0"
|
||||
comment="Rule Id"/>
|
||||
<column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
|
||||
comment="Product Id"/>
|
||||
<column xsi:type="smallint" name="website_id" padding="5" unsigned="true" nullable="false" identity="false"
|
||||
comment="Website Id"/>
|
||||
<column xsi:type="smallint" name="multiplier" padding="6" unsigned="false" nullable="false" identity="false"
|
||||
comment="Relevance Multiplier"/>
|
||||
|
||||
<constraint xsi:type="primary" referenceId="PRIMARY">
|
||||
<column name="rule_id"/>
|
||||
<column name="product_id"/>
|
||||
<column name="website_id"/>
|
||||
</constraint>
|
||||
|
||||
<constraint
|
||||
xsi:type="foreign"
|
||||
referenceId="AMASTY_ELASTIC_RELEVANCE_RULE_INDEX_WS_ID_STORE_WS_WS_ID"
|
||||
table="amasty_elastic_relevance_rule_index_tmp"
|
||||
column="website_id"
|
||||
referenceTable="store_website"
|
||||
referenceColumn="website_id"
|
||||
onDelete="CASCADE"
|
||||
/>
|
||||
|
||||
<constraint
|
||||
xsi:type="foreign"
|
||||
referenceId="AMASTY_ELASTIC_RELEVANCE_RULE_INDEX_PRD_ID"
|
||||
table="amasty_elastic_relevance_rule_index_tmp"
|
||||
column="product_id"
|
||||
referenceTable="catalog_product_entity"
|
||||
referenceColumn="entity_id"
|
||||
onDelete="CASCADE"
|
||||
/>
|
||||
|
||||
<index referenceId="AMASTY_ELASTIC_RELEVANCE_RULE_INDEX_TMP_PR_ID_WS_ID" indexType="btree">
|
||||
<column name="product_id"/>
|
||||
<column name="website_id"/>
|
||||
</index>
|
||||
|
||||
<index referenceId="AMASTY_ELASTIC_RELEVANCE_RULE_INDEX_TMP_WS_ID" indexType="btree">
|
||||
<column name="website_id"/>
|
||||
</index>
|
||||
</table>
|
||||
</schema>
|
||||
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"amasty_elastic_synonym": {
|
||||
"column": {
|
||||
"synonym_id": true,
|
||||
"store_id": true,
|
||||
"term": true
|
||||
},
|
||||
"index": {
|
||||
"AMASTY_ELASTIC_SYNONYM_TERM": true
|
||||
},
|
||||
"constraint": {
|
||||
"PRIMARY": true,
|
||||
"AMASTY_ELASTIC_SYNONYM_TERM_STORE_ID": true
|
||||
}
|
||||
},
|
||||
"amasty_elastic_stop_word": {
|
||||
"column": {
|
||||
"stop_word_id": true,
|
||||
"term": true,
|
||||
"store_id": true
|
||||
},
|
||||
"index": {
|
||||
"AMASTY_ELASTIC_STOP_WORD_TERM": true
|
||||
},
|
||||
"constraint": {
|
||||
"PRIMARY": true,
|
||||
"AMASTY_ELASTIC_STOP_WORD_TERM_STORE_ID": true
|
||||
}
|
||||
},
|
||||
"amasty_elastic_relevance_rule": {
|
||||
"column": {
|
||||
"rule_id": true,
|
||||
"is_enabled": true,
|
||||
"title": true,
|
||||
"website_id": true,
|
||||
"from_date": true,
|
||||
"to_date": true,
|
||||
"multiplier": true,
|
||||
"conditions_serialized": true
|
||||
},
|
||||
"index": {
|
||||
"AMASTY_ELASTIC_RELEVANCE_RULE_IS_ENABLED": true,
|
||||
"AMASTY_ELASTIC_RELEVANCE_RULE_WEBSITE_ID": true
|
||||
},
|
||||
"constraint": {
|
||||
"PRIMARY": true,
|
||||
"AMASTY_ELASTIC_RELEVANCE_RULE_WS_ID_STORE_STORE_ID": true,
|
||||
"AMASTY_ELASTIC_RELEVANCE_RULE_WS_ID_STORE_WS_WS_ID": true,
|
||||
"AMASTY_ELASTIC_RELEVANCE_RULE_WEBSITE_ID_STORE_STORE_ID": true
|
||||
}
|
||||
},
|
||||
"amasty_elastic_relevance_rule_index": {
|
||||
"column": {
|
||||
"id": true,
|
||||
"rule_id": true,
|
||||
"product_id": true,
|
||||
"website_id": true,
|
||||
"from_date": true,
|
||||
"to_date": true,
|
||||
"multiplier": true
|
||||
},
|
||||
"index": {
|
||||
"AMASTY_ELASTIC_RELEVANCE_RULE_INDEX_PRODUCT_ID": true,
|
||||
"AMASTY_ELASTIC_RELEVANCE_RULE_INDEX_WEBSITE_ID": true,
|
||||
"AMASTY_ELASTIC_RELEVANCE_RULE_INDEX_FROM_DATE": true,
|
||||
"AMASTY_ELASTIC_RELEVANCE_RULE_INDEX_TO_DATE": true
|
||||
},
|
||||
"constraint": {
|
||||
"PRIMARY": true,
|
||||
"UNQ_3FBF5323E7E96A23317D09C6790FEF91": true
|
||||
}
|
||||
},
|
||||
"amasty_elastic_relevance_rule_index_tmp": {
|
||||
"column": {
|
||||
"rule_id": true,
|
||||
"product_id": true,
|
||||
"website_id": true,
|
||||
"multiplier": true
|
||||
},
|
||||
"index": {
|
||||
"AMASTY_ELASTIC_RELEVANCE_RULE_INDEX_TMP_PR_ID_WS_ID": true,
|
||||
"AMASTY_ELASTIC_RELEVANCE_RULE_INDEX_TMP_WS_ID": true
|
||||
},
|
||||
"constraint": {
|
||||
"PRIMARY": true,
|
||||
"AMASTY_ELASTIC_RELEVANCE_RULE_INDEX_WS_ID_STORE_WS_WS_ID": true,
|
||||
"AMASTY_ELASTIC_RELEVANCE_RULE_INDEX_PRD_ID": true
|
||||
}
|
||||
}
|
||||
}
|
||||
Executable
+490
@@ -0,0 +1,490 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Elastic Search Base for Magento 2
|
||||
*/-->
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
|
||||
<preference for="Amasty\ElasticSearch\Model\Client\ClientRepositoryInterface"
|
||||
type="Amasty\ElasticSearch\Model\Client\ClientRepository"/>
|
||||
<preference for="Amasty\ElasticSearch\Api\Data\SynonymInterface"
|
||||
type="Amasty\ElasticSearch\Model\Synonym" />
|
||||
<preference for="Amasty\ElasticSearch\Api\SynonymRepositoryInterface"
|
||||
type="Amasty\ElasticSearch\Model\SynonymRepository" />
|
||||
<preference for="Amasty\ElasticSearch\Api\Data\StopWordInterface"
|
||||
type="Amasty\ElasticSearch\Model\StopWord" />
|
||||
<preference for="Amasty\ElasticSearch\Api\StopWordRepositoryInterface"
|
||||
type="Amasty\ElasticSearch\Model\StopWordRepository" />
|
||||
<preference for="Amasty\ElasticSearch\Api\Data\RelevanceRuleInterface"
|
||||
type="Amasty\ElasticSearch\Model\RelevanceRule" />
|
||||
<preference for="Amasty\ElasticSearch\Api\RelevanceRuleRepositoryInterface"
|
||||
type="Amasty\ElasticSearch\Model\RelevanceRuleRepository" />
|
||||
<preference for="Amasty\ElasticSearch\Api\Data\Indexer\Data\DataMapperResolverInterface"
|
||||
type="Amasty\ElasticSearch\Model\Indexer\Data\DataMapperResolver" />
|
||||
<preference for="Amasty\ElasticSearch\Api\Data\Indexer\Structure\AnalyzerBuilderInterface"
|
||||
type="Amasty\ElasticSearch\Model\Indexer\Structure\AnalyserBuilder" />
|
||||
<preference for="Amasty\ElasticSearch\Api\Data\Indexer\Structure\IndexBuilderInterface"
|
||||
type="Amasty\ElasticSearch\Model\Indexer\Structure\IndexBuilder" />
|
||||
|
||||
<type name="Amasty\ElasticSearch\Model\Client\ClientFactory">
|
||||
<arguments>
|
||||
<argument name="engines" xsi:type="array">
|
||||
<item name="amasty_elastic" xsi:type="string">Amasty\ElasticSearch\Model\Client\Elasticsearch7\Client</item>
|
||||
<item name="amasty_elastic_8" xsi:type="string">Amasty\ElasticSearch\Model\Client\Elasticsearch8\Client</item>
|
||||
<item name="amasty_elastic_opensearch" xsi:type="string">Amasty\ElasticSearch\Model\Client\Opensearch\Client</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
<type name="Amasty\ElasticSearch\Model\GetAmastySearchEngines">
|
||||
<arguments>
|
||||
<argument name="amastySearchEngines" xsi:type="array">
|
||||
<item name="amasty_elastic" xsi:type="string">amasty_elastic</item>
|
||||
<item name="amasty_elastic_8" xsi:type="string">amasty_elastic_8</item>
|
||||
<item name="amasty_elastic_opensearch" xsi:type="string">amasty_elastic_opensearch</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
<type name="Amasty\ElasticSearch\Model\Client\ConfigBuilder">
|
||||
<arguments>
|
||||
<argument name="configBuilders" xsi:type="array">
|
||||
<item name="default" xsi:type="object">Amasty\ElasticSearch\Model\Client\Defaults\ConfigBuilder</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Amasty\ElasticSearch\Model\Config\QuerySettings">
|
||||
<arguments>
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="serializer" xsi:type="object">Magento\Framework\Serialize\Serializer\Json</item>
|
||||
<item name="processor" xsi:type="object">Amasty\ElasticSearch\Model\Config\QuerySettingsProcessor</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
<type name="Amasty\ElasticSearch\Model\RelevanceRule">
|
||||
<arguments>
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="catalogrule_factory" xsi:type="object">Amasty\ElasticSearch\Model\RuleFactory</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
|
||||
<arguments>
|
||||
<argument name="collections" xsi:type="array">
|
||||
<item name="amasty_elastic_stopword_listing_data_source"
|
||||
xsi:type="string">Amasty\ElasticSearch\Model\ResourceModel\StopWord\Grid</item>
|
||||
<item name="amasty_elastic_synonym_listing_data_source"
|
||||
xsi:type="string">Amasty\ElasticSearch\Model\ResourceModel\Synonym\Grid</item>
|
||||
<item name="amasty_elastic_relevance_rule_listing_data_source"
|
||||
xsi:type="string">Amasty\ElasticSearch\Model\ResourceModel\RelevanceRule\Grid</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Magento\Framework\Search\Dynamic\IntervalFactory">
|
||||
<arguments>
|
||||
<argument name="intervals" xsi:type="array">
|
||||
<item name="amasty_elastic" xsi:type="string">Amasty\ElasticSearch\Model\Search\GetResponse\GetAggregations\Interval</item>
|
||||
<item name="amasty_elastic_8" xsi:type="string">Amasty\ElasticSearch\Model\Search\GetResponse\GetAggregations\Interval</item>
|
||||
<item name="amasty_elastic_opensearch" xsi:type="string">Amasty\ElasticSearch\Model\Search\GetResponse\GetAggregations\Interval</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
<!-- Deprecated services
|
||||
<type name="Amasty\ElasticSearch\Model\Search\GetRequestQuery\InjectMatchQuery">
|
||||
<arguments>
|
||||
<argument name="services" xsi:type="array">
|
||||
<item name="stopwords" xsi:type="object">Amasty\ElasticSearch\Model\Search\GetRequestQuery\ServicePreprocessor\Stopwords</item>
|
||||
<item name="synonyms" xsi:type="object">Amasty\ElasticSearch\Model\Search\GetRequestQuery\ServicePreprocessor\Synonyms</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
-->
|
||||
<type name="Magento\CatalogSearch\Model\Indexer\IndexerHandlerFactory">
|
||||
<arguments>
|
||||
<argument name="handlers" xsi:type="array">
|
||||
<item name="amasty_elastic" xsi:type="string">Amasty\ElasticSearch\Model\Indexer\DataHandler</item>
|
||||
<item name="amasty_elastic_8" xsi:type="string">Amasty\ElasticSearch8\Model\Indexer\DataHandler</item>
|
||||
<item name="amasty_elastic_opensearch" xsi:type="string">Amasty\Opensearch\Model\Indexer\DataHandler</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Amasty\ElasticSearch\Model\Adapter\Elasticsearch7\Elasticsearch">
|
||||
<arguments>
|
||||
<argument name="fieldMappingBuilder"
|
||||
xsi:type="object">Amasty\ElasticSearch\Model\Adapter\Elasticsearch7\FieldMappingBuilder</argument>
|
||||
<argument name="saveQueryBuilder"
|
||||
xsi:type="object">Amasty\ElasticSearch\Model\Adapter\Elasticsearch7\SaveQueryBuilder</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
<virtualType name="Amasty\ElasticSearch\Model\Adapter\Elasticsearch8\Elasticsearch"
|
||||
type="Amasty\ElasticSearch\Model\Adapter\Elasticsearch7\Elasticsearch">
|
||||
<arguments>
|
||||
<argument name="fieldMappingBuilder"
|
||||
xsi:type="object">Amasty\ElasticSearch\Model\Adapter\Elasticsearch8\FieldMappingBuilder</argument>
|
||||
<argument name="saveQueryBuilder"
|
||||
xsi:type="object">Amasty\ElasticSearch\Model\Adapter\Elasticsearch8\SaveQueryBuilder</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
<virtualType name="Amasty\ElasticSearch\Model\Adapter\Opensearch\Elasticsearch"
|
||||
type="Amasty\ElasticSearch\Model\Adapter\Elasticsearch7\Elasticsearch">
|
||||
<arguments>
|
||||
<argument name="fieldMappingBuilder"
|
||||
xsi:type="object">Amasty\ElasticSearch\Model\Adapter\Opensearch\FieldMappingBuilder</argument>
|
||||
<argument name="saveQueryBuilder"
|
||||
xsi:type="object">Amasty\ElasticSearch\Model\Adapter\Elasticsearch8\SaveQueryBuilder</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
<virtualType name="Amasty\ElasticSearch8\Model\Indexer\StructureHandler"
|
||||
type="Amasty\ElasticSearch\Model\Indexer\StructureHandler">
|
||||
<arguments>
|
||||
<argument name="adapter"
|
||||
xsi:type="object">Amasty\ElasticSearch\Model\Adapter\Elasticsearch8\Elasticsearch</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
<virtualType name="Amasty\Opensearch\Model\Indexer\StructureHandler"
|
||||
type="Amasty\ElasticSearch\Model\Indexer\StructureHandler">
|
||||
<arguments>
|
||||
<argument name="adapter"
|
||||
xsi:type="object">Amasty\ElasticSearch\Model\Adapter\Opensearch\Elasticsearch</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
<type name="Amasty\ElasticSearch\Model\Indexer\StructureHandler">
|
||||
<arguments>
|
||||
<argument name="adapter"
|
||||
xsi:type="object">Amasty\ElasticSearch\Model\Adapter\Elasticsearch7\Elasticsearch</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
<type name="Amasty\ElasticSearch\Model\Indexer\DataHandler">
|
||||
<arguments>
|
||||
<argument name="adapter"
|
||||
xsi:type="object">Amasty\ElasticSearch\Model\Adapter\Elasticsearch7\Elasticsearch</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
<virtualType name="Amasty\ElasticSearch8\Model\Indexer\DataHandler" type="Amasty\ElasticSearch\Model\Indexer\DataHandler">
|
||||
<arguments>
|
||||
<argument name="adapter"
|
||||
xsi:type="object">Amasty\ElasticSearch\Model\Adapter\Elasticsearch8\Elasticsearch</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
<virtualType name="Amasty\Opensearch\Model\Indexer\DataHandler" type="Amasty\ElasticSearch\Model\Indexer\DataHandler">
|
||||
<arguments>
|
||||
<argument name="adapter"
|
||||
xsi:type="object">Amasty\ElasticSearch\Model\Adapter\Opensearch\Elasticsearch</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
<type name="Magento\CatalogSearch\Model\Indexer\IndexStructureFactory">
|
||||
<arguments>
|
||||
<argument name="structures" xsi:type="array">
|
||||
<item name="amasty_elastic" xsi:type="string">Amasty\ElasticSearch\Model\Indexer\StructureHandler</item>
|
||||
<item name="amasty_elastic_8" xsi:type="string">Amasty\ElasticSearch8\Model\Indexer\StructureHandler</item>
|
||||
<item name="amasty_elastic_opensearch" xsi:type="string">Amasty\Opensearch\Model\Indexer\StructureHandler</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<virtualType name="Amasty\ElasticSearch\Model\InventorySalesApi\StockByWebsiteIdResolverInterface"
|
||||
type="Amasty\ElasticSearch\Model\Di\Wrapper">
|
||||
<arguments>
|
||||
<argument name="name"
|
||||
xsi:type="string">Magento\InventorySalesApi\Model\StockByWebsiteIdResolverInterface</argument>
|
||||
<argument name="isShared" xsi:type="boolean">true</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
<virtualType name="Amasty\ElasticSearch\Model\InventorySalesApi\GetStockItemDataInterface"
|
||||
type="Amasty\ElasticSearch\Model\Di\Wrapper">
|
||||
<arguments>
|
||||
<argument name="name"
|
||||
xsi:type="string">Magento\InventorySalesApi\Model\GetStockItemDataInterface</argument>
|
||||
<argument name="isShared" xsi:type="boolean">true</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
<type name="Amasty\ElasticSearch\Model\Indexer\Data\Product\OutofStockDataMapper">
|
||||
<arguments>
|
||||
<argument name="stockByWebsiteIdResolver"
|
||||
xsi:type="object">Amasty\ElasticSearch\Model\InventorySalesApi\StockByWebsiteIdResolverInterface</argument>
|
||||
<argument name="getStockItemData"
|
||||
xsi:type="object">Amasty\ElasticSearch\Model\InventorySalesApi\GetStockItemDataInterface</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
<type name="Amasty\ElasticSearch\Model\Indexer\Structure\EntityBuilder\Product\OutofStockData">
|
||||
<arguments>
|
||||
<argument name="stockByWebsiteIdResolver"
|
||||
xsi:type="object">Amasty\ElasticSearch\Model\InventorySalesApi\StockByWebsiteIdResolverInterface</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
<type name="Amasty\ElasticSearch\Model\Indexer\Structure\EntityBuilder">
|
||||
<arguments>
|
||||
<argument name="entityBuilders" xsi:type="array">
|
||||
<item name="catalogsearch_fulltext" xsi:type="array">
|
||||
<item name="catalog_product" xsi:type="object">Amasty\ElasticSearch\Model\Indexer\Structure\EntityBuilder\Product</item>
|
||||
<item name="catalog_product_category_data" xsi:type="object">Amasty\ElasticSearch\Model\Indexer\Structure\EntityBuilder\Product\CategoryData</item>
|
||||
<item name="external_finder" xsi:type="object">Amasty\ElasticSearch\Model\Indexer\Structure\EntityBuilder\External\Finder</item>
|
||||
<item name="out_of_stock_field" xsi:type="object">Amasty\ElasticSearch\Model\Indexer\Structure\EntityBuilder\Product\OutofStockData</item>
|
||||
</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Amasty\ElasticSearch\Model\Indexer\Data\DataMapperResolver">
|
||||
<arguments>
|
||||
<argument name="dataMappers" xsi:type="array">
|
||||
<item name="catalogsearch_fulltext" xsi:type="array">
|
||||
<item name="catalog_product" xsi:type="object">Amasty\ElasticSearch\Model\Indexer\Data\Product\ProductDataMapper</item>
|
||||
<item name="catalog_product_category" xsi:type="object">Amasty\ElasticSearch\Model\Indexer\Data\Product\ProductCategoryDataMapper</item>
|
||||
<item name="catalog_product_price" xsi:type="object">Amasty\ElasticSearch\Model\Indexer\Data\Product\ProductPriceDataMapper</item>
|
||||
<item name="external_finder" xsi:type="object">Amasty\ElasticSearch\Model\Indexer\Data\External\FinderDataMapper</item>
|
||||
<item name="external_relevance_boost" xsi:type="object">Amasty\ElasticSearch\Model\Indexer\Data\External\RelevanceBoostDataMapper</item>
|
||||
<item name="out_of_stock_value" xsi:type="object">Amasty\ElasticSearch\Model\Indexer\Data\Product\OutofStockDataMapper</item>
|
||||
</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Amasty\ElasticSearch\Model\Search\GetRequestQuery">
|
||||
<arguments>
|
||||
<argument name="subqueryInjectors" xsi:type="array">
|
||||
<item name="match" xsi:type="object">Amasty\ElasticSearch\Model\Search\GetRequestQuery\InjectMatchQuery</item>
|
||||
<item name="wildcardFilter" xsi:type="object">Amasty\ElasticSearch\Model\Search\GetRequestQuery\InjectFilterWildcardQuery</item>
|
||||
<item name="rangeFilter" xsi:type="object">Amasty\ElasticSearch\Model\Search\GetRequestQuery\InjectFilterRangeQuery</item>
|
||||
<item name="termFilter" xsi:type="object">Amasty\ElasticSearch\Model\Search\GetRequestQuery\InjectFilterTermQuery</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Amasty\ElasticSearch\Model\Indexer\Structure\DynamicTemplateMapper">
|
||||
<arguments>
|
||||
<argument name="mappers" xsi:type="array">
|
||||
<item name="category_position_mapping" xsi:type="object">Amasty\ElasticSearch\Model\Indexer\Structure\DynamicTemplate\CategoryPosition</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Magento\CatalogSearch\Model\ResourceModel\EngineProvider">
|
||||
<arguments>
|
||||
<argument name="engines" xsi:type="array">
|
||||
<item name="amasty_elastic" xsi:type="string">Amasty\ElasticSearch\Model\ResourceModel\Engine</item>
|
||||
<item name="amasty_elastic_8" xsi:type="string">Amasty\ElasticSearch\Model\ResourceModel\Engine</item>
|
||||
<item name="amasty_elastic_opensearch" xsi:type="string">Amasty\ElasticSearch\Model\ResourceModel\Engine</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Magento\Search\Model\AdapterFactory">
|
||||
<arguments>
|
||||
<argument name="adapters" xsi:type="array">
|
||||
<item name="amasty_elastic" xsi:type="string">Amasty\ElasticSearch\Model\Search\Adapter</item>
|
||||
<item name="amasty_elastic_8" xsi:type="string">Amasty\ElasticSearch\Model\Search\Adapter</item>
|
||||
<item name="amasty_elastic_opensearch" xsi:type="string">Amasty\ElasticSearch\Model\Search\Adapter</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Magento\Search\Model\EngineResolver">
|
||||
<arguments>
|
||||
<argument name="engines" xsi:type="array">
|
||||
<item name="amasty_elastic" xsi:type="string">amasty_elastic</item>
|
||||
<item name="amasty_elastic_8" xsi:type="string">amasty_elastic_8</item>
|
||||
<item name="amasty_elastic_opensearch" xsi:type="string">amasty_elastic_opensearch</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Magento\Search\Model\Adminhtml\System\Config\Source\Engine">
|
||||
<arguments>
|
||||
<argument name="engines" xsi:type="array">
|
||||
<item name="amasty_elastic" xsi:type="string">Amasty Elasticsearch</item>
|
||||
<item name="amasty_elastic_8" xsi:type="string">Amasty Elasticsearch 8</item>
|
||||
<item name="amasty_elastic_opensearch" xsi:type="string">Amasty Opensearch</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Magento\AdvancedSearch\Model\SuggestedQueries">
|
||||
<arguments>
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="amasty_elastic" xsi:type="string">Magento\AdvancedSearch\Model\DataProvider\Suggestions</item>
|
||||
<item name="amasty_elastic_8" xsi:type="string">Magento\AdvancedSearch\Model\DataProvider\Suggestions</item>
|
||||
<item name="amasty_elastic_opensearch" xsi:type="string">Magento\AdvancedSearch\Model\DataProvider\Suggestions</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Amasty\Xsearch\Helper\Data">
|
||||
<plugin name="Amasty_ElasticSearch::RemoveStopWordsHighlight"
|
||||
type="Amasty\ElasticSearch\Plugin\Xsearch\Helper\Data" />
|
||||
</type>
|
||||
|
||||
<type name="Magento\Framework\Search\Dynamic\Algorithm\Improved">
|
||||
<arguments>
|
||||
<argument name="algorithm" xsi:type="object">Amasty\ElasticSearch\Model\Search\Dynamic\Algorithm</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<virtualType name="amElasticsearchCategoryCollectionFactory" type="Magento\CatalogSearch\Model\ResourceModel\Fulltext\SearchCollectionFactory">
|
||||
<arguments>
|
||||
<argument name="instanceName" xsi:type="string">elasticsearchCategoryCollection</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
|
||||
<virtualType name="amElasticsearchFulltextSearchCollectionFactory" type="Magento\CatalogSearch\Model\ResourceModel\Fulltext\SearchCollectionFactory">
|
||||
<arguments>
|
||||
<argument name="instanceName" xsi:type="string">elasticsearchFulltextSearchCollection</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
|
||||
<virtualType name="elasticsearchLayerCategoryItemCollectionProvider" type="Magento\Elasticsearch\Model\Layer\Category\ItemCollectionProvider">
|
||||
<arguments>
|
||||
<argument name="factories" xsi:type="array">
|
||||
<item name="amasty_elastic" xsi:type="object">amElasticsearchCategoryCollectionFactory</item>
|
||||
<item name="amasty_elastic_8" xsi:type="object">amElasticsearchCategoryCollectionFactory</item>
|
||||
<item name="amasty_elastic_opensearch" xsi:type="object">amElasticsearchCategoryCollectionFactory</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
|
||||
<virtualType name="elasticsearchLayerSearchItemCollectionProvider" type="Magento\Elasticsearch\Model\Layer\Search\ItemCollectionProvider">
|
||||
<arguments>
|
||||
<argument name="factories" xsi:type="array">
|
||||
<item name="amasty_elastic" xsi:type="object">amElasticsearchFulltextSearchCollectionFactory</item>
|
||||
<item name="amasty_elastic_8" xsi:type="object">amElasticsearchFulltextSearchCollectionFactory</item>
|
||||
<item name="amasty_elastic_opensearch" xsi:type="object">amElasticsearchFulltextSearchCollectionFactory</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
|
||||
<type name="Magento\CatalogSearch\Model\Search\ItemCollectionProvider">
|
||||
<arguments>
|
||||
<argument name="factories" xsi:type="array">
|
||||
<item name="amasty_elastic" xsi:type="object">Amasty\ElasticSearch\Model\ResourceModel\Advanced\CollectionFactory</item>
|
||||
<item name="amasty_elastic_8" xsi:type="object">Amasty\ElasticSearch\Model\ResourceModel\Advanced\CollectionFactory</item>
|
||||
<item name="amasty_elastic_opensearch" xsi:type="object">Amasty\ElasticSearch\Model\ResourceModel\Advanced\CollectionFactory</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Magento\Search\Model\Search\PageSizeProvider">
|
||||
<arguments>
|
||||
<argument name="pageSizeBySearchEngine" xsi:type="array">
|
||||
<item name="amasty_elastic" xsi:type="number">10000</item>
|
||||
<item name="amasty_elastic_8" xsi:type="number">10000</item>
|
||||
<item name="amasty_elastic_opensearch" xsi:type="number">10000</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Amasty\ElasticSearch\Model\Indexer\Structure\CustomAnalyzersMetaInfoProvider">
|
||||
<arguments>
|
||||
<argument name="customAnalyzersMetaInfo" xsi:type="array">
|
||||
<item name="smartcn" xsi:type="array">
|
||||
<item name="class" xsi:type="string">Amasty\ElasticSearch\Model\Indexer\Structure\AnalyzerBuilder\Smartcn</item>
|
||||
<item name="label" xsi:type="string" translatable="true">Chinese</item>
|
||||
</item>
|
||||
<item name="kuromoji" xsi:type="array">
|
||||
<item name="class" xsi:type="string">Amasty\ElasticSearch\Model\Indexer\Structure\AnalyzerBuilder\Kuromoji</item>
|
||||
<item name="label" xsi:type="string" translatable="true">Japanese</item>
|
||||
</item>
|
||||
<item name="nori" xsi:type="array">
|
||||
<item name="class" xsi:type="string">Amasty\ElasticSearch\Model\Indexer\Structure\AnalyzerBuilder\Nori</item>
|
||||
<item name="label" xsi:type="string" translatable="true">Korean</item>
|
||||
</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Magento\Config\Model\Config\TypePool">
|
||||
<arguments>
|
||||
<argument name="environment" xsi:type="array">
|
||||
<item name="amasty_elastic/connection/server_hostname" xsi:type="string">1</item>
|
||||
<item name="amasty_elastic/connection/server_port" xsi:type="string">1</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Amasty\ElasticSearch\Model\Search\GetRequestQuery">
|
||||
<arguments>
|
||||
<argument name="requestNamesForApplyRelevanceRules" xsi:type="array">
|
||||
<item name="catalog_search" xsi:type="string">catalogsearch_fulltext</item>
|
||||
<item name="quick_search" xsi:type="string">quick_search_container</item>
|
||||
<item name="graphql_search" xsi:type="string">graphql_product_search</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<virtualType name="Amasty\ElasticSearch\Model\ResourceModel\RelevanceRule\OnDeleteCallbackPull"
|
||||
type="Amasty\ElasticSearch\Model\ResourceModel\RelevanceRule\CRUDCallbackPull">
|
||||
<arguments>
|
||||
<argument name="crudCallbacks" xsi:type="array">
|
||||
<item name="0" xsi:type="array">
|
||||
<item name="sortOrder" xsi:type="number">10</item>
|
||||
<item name="action" xsi:type="object">
|
||||
Amasty\ElasticSearch\Model\ResourceModel\RelevanceRule\AdditionalSaveActions\InvalidateFulltextIndex
|
||||
</item>
|
||||
</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
|
||||
<virtualType name="Amasty\ElasticSearch\Model\ResourceModel\RelevanceRule\OnSaveCallbackPull"
|
||||
type="Amasty\ElasticSearch\Model\ResourceModel\RelevanceRule\CRUDCallbackPull">
|
||||
<arguments>
|
||||
<argument name="crudCallbacks" xsi:type="array">
|
||||
<item name="0" xsi:type="array">
|
||||
<item name="sortOrder" xsi:type="number">10</item>
|
||||
<item name="action" xsi:type="object">
|
||||
Amasty\ElasticSearch\Model\ResourceModel\RelevanceRule\AdditionalSaveActions\ReindexRules
|
||||
</item>
|
||||
</item>
|
||||
<item name="1" xsi:type="array">
|
||||
<item name="sortOrder" xsi:type="number">20</item>
|
||||
<item name="action" xsi:type="object">
|
||||
Amasty\ElasticSearch\Model\ResourceModel\RelevanceRule\AdditionalSaveActions\InvalidateFulltextIndex
|
||||
</item>
|
||||
</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
|
||||
<type name="Amasty\ElasticSearch\Model\ResourceModel\RelevanceRule">
|
||||
<arguments>
|
||||
<argument name="onDeleteCallbackPull" xsi:type="object">
|
||||
Amasty\ElasticSearch\Model\ResourceModel\RelevanceRule\OnDeleteCallbackPull
|
||||
</argument>
|
||||
<argument name="onSaveCallbackPull" xsi:type="object">
|
||||
Amasty\ElasticSearch\Model\ResourceModel\RelevanceRule\OnSaveCallbackPull
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Magento\CatalogRule\Model\ResourceModel\Product\ConditionsToCollectionApplier">
|
||||
<plugin name="Amasty_ElasticSearch::removeSortingCondition"
|
||||
type="Amasty\ElasticSearch\Plugin\CatalogRule\Model\ResourceModel\Product\ConditionsToCollectionApplier\DisableValidateCondition"/>
|
||||
</type>
|
||||
|
||||
<virtualType name="Amasty\ElasticSearch\Model\Rule\Condition\CombineFactory"
|
||||
type="Magento\CatalogRule\Model\Rule\Condition\CombineFactory">
|
||||
<arguments>
|
||||
<argument name="instanceName" xsi:type="string">Amasty\ElasticSearch\Model\Rule\Condition\Combine</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
|
||||
<type name="Amasty\ElasticSearch\Model\Rule">
|
||||
<arguments>
|
||||
<argument name="combineFactory" xsi:type="object">Amasty\ElasticSearch\Model\Rule\Condition\CombineFactory</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<type name="Amasty\ElasticSearch\Model\Rule\Condition\Combine">
|
||||
<arguments>
|
||||
<argument name="data" xsi:type="array">
|
||||
<item name="amasty_sorting" xsi:type="array">
|
||||
<item name="bestseller" xsi:type="object">Amasty\ElasticSearch\Model\Rule\Condition\Bestsellers</item>
|
||||
</item>
|
||||
<item name="module_manager" xsi:type="object">Magento\Framework\Module\Manager</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
</config>
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Elastic Search Base for Magento 2
|
||||
*/-->
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
|
||||
<type name="Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection">
|
||||
<plugin name="Amasty_ElasticSearch::addDefaultSortToMagento2.1"
|
||||
type="Amasty\ElasticSearch\Plugin\CatalogSearch\Model\ResourceModel\Fulltext\Collection" />
|
||||
</type>
|
||||
<type name="Magento\CatalogSearch\Model\Search\RequestGenerator">
|
||||
<plugin name="Amasty_ElasticSearch::SearchRequestGeneratorFix"
|
||||
type="Amasty\ElasticSearch\Plugin\CatalogSearch\Model\Search\RequestGenerator" />
|
||||
</type>
|
||||
<type name="Magento\Framework\Search\Request\Binder">
|
||||
<plugin name="Amasty_ElasticSearch::AllProductsOptionFix"
|
||||
type="Amasty\ElasticSearch\Plugin\Search\Request\Binder" />
|
||||
</type>
|
||||
|
||||
<type name="Magento\CatalogSearch\Block\Result">
|
||||
<plugin name="Amasty_ElasticSearch::AddSecondSearchQueryInput"
|
||||
type="Amasty\ElasticSearch\Plugin\CatalogSearch\Block\Result\AddSecondSearchQueryInput" />
|
||||
</type>
|
||||
<type name="Magento\CatalogSearch\Controller\Result\Index">
|
||||
<plugin name="Amasty_ElasticSearch::RegisterSubQuery"
|
||||
type="Amasty\ElasticSearch\Plugin\CatalogSearch\Controller\Result\Index\RegisterSubQuery" />
|
||||
</type>
|
||||
<type name="Magento\Framework\Api\Search\SearchInterface">
|
||||
<plugin name="Amasty_ElasticSearch::SearchWithSubQuery"
|
||||
type="Amasty\ElasticSearch\Plugin\Framework\Api\Search\SearchInterface\SearchWithSubQuery" />
|
||||
</type>
|
||||
<type name="Amasty\Xsearch\Plugin\CatalogSearch\Block\Result\ChangeNoResultText">
|
||||
<plugin name="Amasty_ElasticSearch::ReplaceQueryText"
|
||||
type="Amasty\ElasticSearch\Plugin\Xsearch\Plugin\CatalogSearch\Block\Result\ChangeNoResultText\ReplaceQueryText" />
|
||||
</type>
|
||||
</config>
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Elastic Search Base for Magento 2
|
||||
*/-->
|
||||
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Indexer/etc/indexer.xsd">
|
||||
<indexer id="amasty_elastic_relevance_rule_rule" view_id="amasty_elastic_relevance_rule_rule" class="Amasty\ElasticSearch\Model\Indexer\RelevanceRule\RuleProductIndexer" shared_index="amasty_elastic_relevance_rule">
|
||||
<title translate="true">Amasty: ElasticSearch - Relevance Rules (Rules)</title>
|
||||
<description translate="true">Indexed rule/product association</description>
|
||||
<dependencies>
|
||||
<indexer id="catalogrule_product" />
|
||||
<indexer id="catalog_product_attribute" />
|
||||
</dependencies>
|
||||
</indexer>
|
||||
<indexer id="amasty_elastic_relevance_rule_product" view_id="amasty_elastic_relevance_rule_product" class="Amasty\ElasticSearch\Model\Indexer\RelevanceRule\ProductRuleIndexer" shared_index="amasty_elastic_relevance_rule">
|
||||
<title translate="true">Amasty: ElasticSearch - Relevance Rules (Products)</title>
|
||||
<description translate="true">Indexed product/rule association</description>
|
||||
<dependencies>
|
||||
<indexer id="catalogrule_product" />
|
||||
<indexer id="catalog_product_attribute" />
|
||||
</dependencies>
|
||||
</indexer>
|
||||
<indexer id="catalogsearch_fulltext" view_id="catalogsearch_fulltext" class="Magento\CatalogSearch\Model\Indexer\Fulltext">
|
||||
<dependencies>
|
||||
<indexer id="amasty_elastic_relevance_rule_product" />
|
||||
</dependencies>
|
||||
</indexer>
|
||||
</config>
|
||||
Executable
+18
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Elastic Search Base for Magento 2
|
||||
*/-->
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
|
||||
<module name="Amasty_ElasticSearch" setup_version="1.13.0">
|
||||
<sequence>
|
||||
<module name="Magento_CatalogSearch"/>
|
||||
<module name="Magento_Search"/>
|
||||
<module name="Magento_Indexer"/>
|
||||
<module name="Magento_CatalogRule"/>
|
||||
<module name="Magento_CatalogRuleConfigurable"/>
|
||||
</sequence>
|
||||
</module>
|
||||
</config>
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Mview/etc/mview.xsd">
|
||||
<view id="amasty_elastic_relevance_rule_rule" class="Amasty\ElasticSearch\Model\Indexer\RelevanceRule\RuleProductIndexer" group="indexer">
|
||||
<subscriptions>
|
||||
<table name="amasty_elastic_relevance_rule" entity_column="rule_id" />
|
||||
</subscriptions>
|
||||
</view>
|
||||
<view id="amasty_elastic_relevance_rule_product" class="Amasty\ElasticSearch\Model\Indexer\RelevanceRule\ProductRuleIndexer" group="indexer">
|
||||
<subscriptions>
|
||||
<table name="catalog_product_entity" entity_column="entity_id" />
|
||||
<table name="catalog_product_entity_datetime" entity_column="entity_id" />
|
||||
<table name="catalog_product_entity_decimal" entity_column="entity_id" />
|
||||
<table name="catalog_product_entity_gallery" entity_column="entity_id" />
|
||||
<table name="catalog_product_entity_int" entity_column="entity_id" />
|
||||
<table name="catalog_product_entity_media_gallery_value" entity_column="entity_id" />
|
||||
<table name="catalog_product_entity_text" entity_column="entity_id" />
|
||||
<table name="catalog_product_entity_tier_price" entity_column="entity_id" />
|
||||
<table name="catalog_product_entity_varchar" entity_column="entity_id" />
|
||||
<table name="catalog_category_product" entity_column="product_id" />
|
||||
</subscriptions>
|
||||
</view>
|
||||
</config>
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Elastic Search Base for Magento 2
|
||||
*/-->
|
||||
|
||||
<requests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:Search/etc/search_request.xsd">
|
||||
<request query="quick_search_container" index="catalogsearch_fulltext">
|
||||
<queries>
|
||||
<query xsi:type="boolQuery" name="quick_search_container">
|
||||
<queryReference clause="must" ref="amasty_entity_ids"/>
|
||||
</query>
|
||||
<query xsi:type="filteredQuery" name="amasty_entity_ids">
|
||||
<filterReference clause="must" ref="amasty_entity_ids_filter"/>
|
||||
</query>
|
||||
</queries>
|
||||
<filters>
|
||||
<filter xsi:type="termFilter" name="amasty_entity_ids_filter"
|
||||
field="entity_id" value="$amasty_entity_ids$"/>
|
||||
</filters>
|
||||
</request>
|
||||
</requests>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
/**
|
||||
* @author Amasty Team
|
||||
* @copyright Copyright (c) Amasty (https://www.amasty.com)
|
||||
* @package Elastic Search Base for Magento 2
|
||||
*/-->
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
|
||||
<type name="Magento\Catalog\Model\Product">
|
||||
<plugin name="Amasty_ElasticSearch::apply_relevance_rules_after_product_save_and_reindex" type="Amasty\ElasticSearch\Plugin\Catalog\Model\ProductPlugin"/>
|
||||
</type>
|
||||
</config>
|
||||
Reference in New Issue
Block a user