1

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 2

2

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.

1
  • yes magento2 ee not working with latest elasticsearch Nov 24, 2017 at 10:44
0

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)
];
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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