Skip to content

Commit

Permalink
Fix mappings in index recreate mode
Browse files Browse the repository at this point in the history
  • Loading branch information
markus-moser committed Jan 25, 2024
1 parent 086e1f0 commit c822045
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Service/SearchIndex/OpenSearch/OpenSearchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ public function createIndex(string $indexName, array $mappings = null): OpenSear
}

if ($mappings) {
$body['mappings']['properties'] = $mappings['body']['properties'];
$body['mappings']['_source'] = $mappings['body']['_source'];
$body['mappings']['properties'] = $mappings;
}

$response = $this->openSearchClient->indices()->create(
Expand Down

0 comments on commit c822045

Please sign in to comment.