skip to Main Content

I have successfully integrated elastic search(Elasticsearch 6.0) with Magento Enterprise Edition 2.1. As per their documentation, I have tried to reindex calalog by using magento cli command

bin/magento indexer:reindex catalogsearch_fulltext

But it throws an error like

Catalog Search indexer process unknown error:
Content-Type header [] is not supported

I read that,Elasticsearch 6.0 is implemented strict content-type checking.So how can I solve this in Magento EE 2.1 ?

2

Answers


  1. Chosen as BEST ANSWER

    As per the Magento EE documentation, they support Elasticsearch versions 1.4, 1.7, and 2.4. The default version is 1.7.

    But I tried to inegrate latest version of elasticsearch (Elasticsearch 6.0).I have installed elasticsearch 2.4 and working fine now.


  2. Problem in the module – magento/module-elasticsearch.
    In this module "composer.json" contain "elasticsearch/elasticsearch": "~2.0". And he doesn’t support Elasticsearch 6.0.

    For version 6, there should be an additional parameter “Content-Type” in header to be sent
    https://github.com/elastic/elasticsearch-php/commit/fd3b0f16f7e09cb2096ef5f2d656c9fd8dd3d61d#diff-1b0215334399d80759820e3229367adf

    https://github.com/elastic/elasticsearch-php/blob/master/src/Elasticsearch/Connections/Connection.php, line 159, $this->headers

       $request = [
        'http_method' => $method,
        'scheme'      => $this->transportSchema,
        'uri'         => $this->getURI($uri, $params),
        'body'        => $body,
        'headers'     => array_merge([
        'Host'  => [$this->host]
        ], $this->headers)
        ];
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search