Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

60 righe
3.7 KiB

  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  9. xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
  10. <preference for="Magento\Search\Api\SearchInterface" type="Magento\Search\Model\Search"/>
  11. <preference for="Magento\Framework\Search\EngineResolverInterface" type="Magento\Search\Model\EngineResolver"/>
  12. <type name="Magento\Framework\Module\Setup\Migration">
  13. <arguments>
  14. <argument name="compositeModules" xsi:type="array">
  15. <item name="search" xsi:type="string">Magento_Search</item>
  16. </argument>
  17. </arguments>
  18. </type>
  19. <preference for="Magento\Search\Model\QueryFactoryInterface" type="Magento\Search\Model\QueryFactory" />
  20. <preference for="Magento\Search\Model\QueryInterface" type="Magento\Search\Model\Query" />
  21. <preference for="Magento\Search\Api\SynonymAnalyzerInterface" type="Magento\Search\Model\SynonymAnalyzer" />
  22. <type name="Magento\Search\Model\EngineResolver">
  23. <arguments>
  24. <argument name="path" xsi:type="string">catalog/search/engine</argument>
  25. <argument name="scopeType" xsi:type="string">default</argument>
  26. </arguments>
  27. </type>
  28. <preference for="Magento\Search\Model\AutocompleteInterface" type="Magento\Search\Model\Autocomplete" />
  29. <preference for="Magento\Search\Model\Autocomplete\ItemInterface" type="Magento\Search\Model\Autocomplete\Item" />
  30. <preference for="Magento\Framework\Search\SearchEngineInterface" type="Magento\Search\Model\SearchEngine"/>
  31. <!-- @api -->
  32. <virtualType name="Magento\Search\Model\ResourceModel\Synonyms\Grid\Collection" type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
  33. <arguments>
  34. <argument name="name" xsi:type="string">search_synonyms_grid_data_source</argument>
  35. <argument name="primaryFieldName" xsi:type="string">group_id</argument>
  36. <argument name="requestFieldName" xsi:type="string">id</argument>
  37. <argument name="mainTable" xsi:type="string">search_synonyms</argument>
  38. <argument name="resourceModel" xsi:type="string">Magento\Search\Model\ResourceModel\SynonymGroup</argument>
  39. </arguments>
  40. </virtualType>
  41. <type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
  42. <arguments>
  43. <argument name="collections" xsi:type="array">
  44. <item name="search_synonyms_grid_data_source" xsi:type="string">Magento\Search\Model\ResourceModel\Synonyms\Grid\Collection</item>
  45. </argument>
  46. </arguments>
  47. </type>
  48. <preference for="Magento\Search\Api\Data\SynonymGroupInterface" type="Magento\Search\Model\SynonymGroup" />
  49. <preference for="Magento\Search\Api\SynonymGroupRepositoryInterface" type="Magento\Search\Model\SynonymGroupRepository" />
  50. <preference for="Magento\Framework\Search\Adapter\Preprocessor\PreprocessorInterface" type="Magento\Search\Adapter\Query\Preprocessor\Synonyms" />
  51. <preference for="Magento\Framework\Search\SearchEngine\ConfigInterface" type="Magento\Search\Model\SearchEngine\Config" />
  52. <type name="Magento\Search\Model\SearchEngine\Config">
  53. <arguments>
  54. <argument name="dataStorage" xsi:type="object">Magento\Search\Model\SearchEngine\Config\Data</argument>
  55. </arguments>
  56. </type>
  57. <preference for="Magento\Search\Setup\InstallConfigInterface" type="Magento\Search\Setup\CompositeInstallConfig"/>
  58. <preference for="Magento\Search\Model\SearchEngine\ValidatorInterface" type="Magento\Search\Model\SearchEngine\Validator"/>
  59. </config>