<?xml version="1.0"?>
<!--
/**
 * @author Amasty Team
 * @copyright Copyright (c) Amasty (https://www.amasty.com)
 * @package Advanced 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\Search\Model\Query">
        <plugin name="Amasty_Xsearch::UpdateUserSearch"
                type="Amasty\Xsearch\Plugin\Search\Model\Query\UpdateUserSearch"/>
    </type>

    <type name="Magento\InventoryElasticsearch\Model\ResourceModel\SortableBySaleabilityProvider">
        <plugin name="Amasty_Xsearch::DisableOutOfStockSort"
                type="Amasty\Xsearch\Plugin\InventoryElasticsearch\Model\ResourceModel\SortableBySaleabilityProvider\DisableOutOfStockSort"/>
    </type>
</config>
