0

I am trying to install smile/elasticsuite using composer but I am getting a really strange error.

To install the module I used:

composer require smile/elasticsuite:2.6.0

And got successful response:

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 5 installs, 0 updates, 0 removals
  - Installing react/promise (v2.7.0): Loading from cache
  - Installing guzzlehttp/streams (3.0.0): Loading from cache
  - Installing guzzlehttp/ringphp (1.1.1): Loading from cache
  - Installing elasticsearch/elasticsearch (v5.3.2): Loading from cache
  - Installing smile/elasticsuite (2.6.0): Loading from cache
Package sjparkinson/static-review is abandoned, you should avoid using it. Use phpro/grumphp instead.
Writing lock file
Generating autoload files

Then run following:

bin/magento setup:upgrade

bin/magento cache:flush

Now, on the front-end, I get the following error message:

Please upgrade your database: Run "bin/magento setup:upgrade" from the Magento root directory.
The following modules are outdated:
Smile_ElasticsuiteCatalog data: current version - none, required version - 1.5.0
Smile_ElasticsuiteCatalogRule data: current version - none, required version - 1.0.0
Smile_ElasticsuiteCatalogOptimizer data: current version - none, required version - 1.1.0
Smile_ElasticsuiteSwatches data: current version - none, required version - 0.0.1
Smile_ElasticsuiteThesaurus data: current version - none, required version - 1.0.0
Smile_ElasticsuiteTracker data: current version - none, required version - 1.2.0
Smile_ElasticsuiteVirtualCategory data: current version - none, required version - 1.3.0

Updates the Magento software doesn't do anything.

Any ideas?

UPDATE

After adding the missing configurations, I get an error on bin/magento setup:upgrade:

{
   "error": {
      "root_cause": [
         {
            "type": "mapper_parsing_exception",
            "reason": "No handler for type [text] declared on field [search]"
         }
      ],
      "type": "mapper_parsing_exception",
      "reason": "No handler for type [text] declared on field [search]"
   },
   "status": 400
}

UPDATE 2:

Result of curl:

{
  "name" : "Squidboy",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "0L1pnmTiQBaWL21J5p5iPw",
  "version" : {
    "number" : "2.4.5",
    "build_hash" : "c849dd13904f53e63e88efc33b2ceeda0b6a1276",
    "build_timestamp" : "2017-04-24T16:18:17Z",
    "build_snapshot" : false,
    "lucene_version" : "5.5.4"
  },
  "tagline" : "You Know, for Search"
}
1

Please make sure your ElasticServer is up and running. You can use the following CLI commands to test the availability and the outcome:

curl localhost:9200

{
  "name" : "xN9wlEs",
  "cluster_name" : "clustername",
  "cluster_uuid" : "DC9ipvdISOyw0i3dqsrTzQ",
  "version" : {
    "number" : "6.4.0",
    "build_flavor" : "default",
    "build_type" : "zip",
    "build_hash" : "595516e",
    "build_date" : "2018-08-17T23:18:47.308994Z",
    "build_snapshot" : false,
    "lucene_version" : "7.4.0",
    "minimum_wire_compatibility_version" : "5.6.0",
    "minimum_index_compatibility_version" : "5.0.0"
  },
  "tagline" : "You Know, for Search"
}

Pleas keep in mind that the ElasticSuite ^2.6 supports ElasticSearch 6.x so use it. A lot of things got fixed enhanced on that version. Also ElasticSuite ^2.6 is not compatible with ElasticSearch 2.x.


Installing ElasticSearch 6.x

For a detailed instruction "tutorial" please refer to the official Smile_Elasticsuite documentary to get everything correct

https://github.com/Smile-SA/elasticsuite/wiki/ServerConfig-5.x#installing-elasticsearch

After you installed and configured ElasticSearch and ElasticSuite do the following steps:

bin/magento setup:upgrade

bin/magento setup:di:compile

bin/magento setup:static-content:deploy

Clear magento Cache

  • Hi Marcel! Thanks for reaching out! I updated my answer with the result of curl. Looks a bit different from your, do you spot anything wrong in the response? – Greg Oct 10 '18 at 14:52
  • Looks like you have installed an old version of ElasticSearch, but thats not that bad - We can fix all the problems. Whats your installed version of the Smile_ElasticSuite and your Magento Version? – Marcel H. Oct 10 '18 at 14:53
  • I use Magento ver. 2.2.4 and installed the Smile_ElasticSuite:2.6.0 – Greg Oct 10 '18 at 14:58
  • Based on your curl request your installed ElasticSearch version is "number" : "2.4.5". In order to make it work with Magento 2.2.x and ElasticSuite 2.6.x you need to install ElasticSearch 6.x. Please make sure to install the correct version of ElasticSearch (dont get mixed up with ElasticSuite and ElasticSearch - Theese are 2 different things. Take the ElasticSuite as Gateway and ElasticSearch as the actuall Searchprovider). You can find the correct ElasticSearch version here: elastic.co/downloads/elasticsearch – Marcel H. Oct 10 '18 at 15:08
  • 1
    You are welcome :) – Marcel H. Oct 12 '18 at 11:46
1

This module need running elasticsearch and need pre-configuration. So open app/etc/env.php and added this after install index:


'system' => [
    'default' => [
        'smile_elasticsuite_core_base_settings' => [
            'es_client' => [
                'servers' => 'localhost:9200',
                'enable_https_mode' => 0,
                'enable_http_auth' => 0,
                'http_auth_user' => '',
                'http_auth_pwd' => '',
                'scheme' => 'http'
            ]
        ]
    ]
]

Now looks like


'install' => [
'date' => 'Sat, 02 Jun 2018 13:40:02 +0000'
],
'system' => [
    'default' => [
        'smile_elasticsuite_core_base_settings' => [
            'es_client' => [
                'servers' => 'localhost:9200',
                'enable_https_mode' => 0,
                'enable_http_auth' => 0,
                'http_auth_user' => '',
                'http_auth_pwd' => '',
                'scheme' => 'http'
            ]
        ]
    ]
]

Now run setup:upgrade command.

  • Hi! Thanks for reply. Tried this but with no success, still the same error. – Greg Oct 10 '18 at 13:38
  • Ignore above comment. You are correct, there were some configs missing. I get a different error on setup:upgrade now. See my updated question. – Greg Oct 10 '18 at 13:55
  • Also, congratulations on getting M2 Solution Specialist Certificate :) – Greg Oct 10 '18 at 14:13
1

That means you didn't enable these Modules before setup upgrade.

run: bin/magento module:enable --all

after that run bin/magento setup:upgrade

just before your answer updated. You must install Elastic Server before config elastic to connect. ------------ DONE Update 1:

------------ Next Update about error text

I think that you have installed the newest version of Elastic on the server. You must use Elastic 2.4.4 it as stable as newest with Magento 2

Which version should I use ?

Magento Version ElasticSuite Latest Version
Magento 2.0.x Opensource (CE) / Commerce (EE)   ElasticSuite 2.1.x latest release : composer require smile/elasticsuite ^2.1.0
Magento 2.1.x Opensource (CE) / Commerce (EE)   ElasticSuite 2.3.x latest release : composer require smile/elasticsuite ^2.3.0
Magento 2.2.x Opensource (CE) / Commerce (EE)   ElasticSuite 2.6.x latest release : composer require smile/elasticsuite ^2.6.0

Issue Link: https://github.com/Smile-SA/elasticsuite/issues/985

  • The modules are enabled. Running bin/magento module:status gave me List of disabled modules: None – Greg Oct 10 '18 at 14:15
  • Have you check these modules has available in your source code?? Smile_ElasticsuiteCatalog – HoangHieu Oct 10 '18 at 14:17
  • Yeah, the code base is present in vendor. – Greg Oct 10 '18 at 14:19
  • remove the config in env.php ?? make sure didn't change anything? I mean revert you added config before asking this question. – HoangHieu Oct 10 '18 at 14:27
  • bin/magento module:status | grep Smile_ElasticsuiteCatalog ?? – HoangHieu Oct 10 '18 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.