Skip to content

Commit

Permalink
Merge pull request #16 from Smile-SA/2.0.0
Browse files Browse the repository at this point in the history
Dataset compatibility ES 2.10
  • Loading branch information
Fanny DECLERCK authored Aug 24, 2020
2 parents 99afa86 + 846ee29 commit 6c56546
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
14 changes: 13 additions & 1 deletion etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<preference for="Smile\Offer\Api\Data\OfferSearchResultsInterface" type="Magento\Framework\Api\SearchResults" />

<preference for="Smile\Offer\Api\OfferRepositoryInterface" type="Smile\Offer\Model\OfferRepository" />

<preference for="Smile\Offer\Api\OfferManagementInterface" type="Smile\Offer\Model\OfferManagement" />

<preference for="Smile\Offer\Model\Locator\LocatorInterface" type="Smile\Offer\Model\Locator\RegistryLocator"/>
Expand All @@ -45,4 +45,16 @@
</argument>
</arguments>
</type>
<!-- Datasources resolver -->
<type name="Smile\ElasticsuiteCore\Index\Type\DataSourceResolver">
<arguments>
<argument name="datasources" xsi:type="array">
<item name="catalog_product" xsi:type="array">
<item name="product" xsi:type="array">
<item name="offers" xsi:type="object">Smile\Offer\Model\Product\Indexer\Fulltext\Datasource\OfferData</item>
</item>
</item>
</argument>
</arguments>
</type>
</config>
4 changes: 0 additions & 4 deletions etc/elasticsuite_indices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@

<index identifier="catalog_product" defaultSearchType="product">
<type name="product" idFieldName="entity_id">
<datasources>
<datasource name="offers">Smile\Offer\Model\Product\Indexer\Fulltext\Datasource\OfferData</datasource>
</datasources>

<mapping>
<!-- Static fields handled by the "offers" datasource -->
<field name="offer.offer_id" type="integer" nestedPath="offer" />
Expand Down

0 comments on commit 6c56546

Please sign in to comment.