Skip to content

Commit

Permalink
Fix content and accept type problems
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Aug 16, 2022
1 parent f3d5a65 commit 1f3c75a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Service/ManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,16 @@ public function createManager($managerName, $connection, $analysis, $managerConf
if (version_compare($elasticSearchVersion, '7.0.0', '>=')) {
$indexSettings['include_type_name'] = true;

$client->setConnectionParams([
'client' => [
'headers' => [
'Accept' => ['application/vnd.elasticsearch+json;compatible-with=7'],
'Content-Type' => ['application/vnd.elasticsearch+json;compatible-with=7'],
if (version_compare($elasticSearchVersion, '7.11.0', '>=')) {
$client->setConnectionParams([
'client' => [
'headers' => [
'Accept' => ['application/vnd.elasticsearch+json;compatible-with=7'],
'Content-Type' => ['application/vnd.elasticsearch+json;compatible-with=7'],
]
]
]
]);
]);
}
}

$this->eventDispatcher &&
Expand Down

0 comments on commit 1f3c75a

Please sign in to comment.