Skip to content

Commit 12d1114

Browse files
committed
Updated module. Added compatibility with Magento 2.3.*. Updated module version.
1 parent 92fcc39 commit 12d1114

6 files changed

Lines changed: 25 additions & 11 deletions

File tree

Model/Post/Indexer/Fulltext.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ class Fulltext implements ActionInterface, MviewActionInterface
1515
*/
1616
const INDEXER_ID = 'elasticsuite_blog_fulltext';
1717

18-
/** @var array index structure */
19-
protected $data;
20-
2118
/**
2219
* @var IndexerInterface
2320
*/
@@ -49,14 +46,12 @@ public function __construct(
4946
Full $fullAction,
5047
IndexerInterface $indexerHandler,
5148
StoreManagerInterface $storeManager,
52-
DimensionFactory $dimensionFactory,
53-
array $data
49+
DimensionFactory $dimensionFactory
5450
) {
5551
$this->fullAction = $fullAction;
5652
$this->indexerHandler = $indexerHandler;
5753
$this->storeManager = $storeManager;
5854
$this->dimensionFactory = $dimensionFactory;
59-
$this->data = $data;
6055
}
6156

6257
/**

Model/ResourceModel/Post/Fulltext/Collection.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22
namespace Comwrap\ElasticsuiteBlog\Model\ResourceModel\Post\Fulltext;
33

4-
use Magento\Framework\DB\Select;
54
use Smile\ElasticsuiteCore\Search\RequestInterface;
65
use Smile\ElasticsuiteCore\Search\Request\BucketInterface;
76

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ It allows to index Blog posts into the search engine and display them into the a
77

88
### Requirements
99

10+
* Magento Community Edition 2.3.* or Magento Enterprise Edition 2.3.*
11+
1012
The module requires :
1113

1214
- [ElasticSuite](https://github.com/Smile-SA/elasticsuite) > 2.1.*
13-
- [MageFanBlog](https://github.com/magefan/module-blog)
15+
- [MageFanBlog](https://github.com/magefan/module-blog) > 2.5.*
1416

1517
### How to use
1618

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "comwrap/module-elasticsuite-blog-search",
33
"type": "magento2-module",
4-
"version": "1.0.0",
4+
"version": "2.0.0",
55
"license": ["OSL-3.0", "AFL-3.0"],
66
"description": "Comwrap Elasticsuite - Blog Post Search Module for Smile Elasticsuite.",
77
"repositories": [
@@ -30,4 +30,4 @@
3030
"Comwrap\\ElasticsuiteBlog\\": ""
3131
}
3232
}
33-
}
33+
}

etc/frontend/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<type name="Magento\Search\Model\Autocomplete">
44
<arguments>
55
<argument name="dataProviders" xsi:type="array">
6-
<item name="30" xsi:type="object">Comwrap\ElasticsuiteBlog\Model\Autocomplete\Post\DataProvider</item>
6+
<item name="64" xsi:type="object">Comwrap\ElasticsuiteBlog\Model\Autocomplete\Post\DataProvider</item>
77
</argument>
88
</arguments>
99
</type>

view/frontend/layout/default.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0"?>
2+
3+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
5+
<body>
6+
<referenceBlock name="top.search">
7+
<arguments>
8+
<argument name="rendererList" xsi:type="array">
9+
<item name="blog_post" xsi:type="array">
10+
<item name="title" xsi:type="string">News</item>
11+
<item name="template" xsi:type="string">Comwrap_ElasticsuiteBlog/autocomplete/post</item>
12+
</item>
13+
</argument>
14+
</arguments>
15+
</referenceBlock>
16+
17+
</body>
18+
</page>

0 commit comments

Comments
 (0)