diff --git a/src/Base/ElasticPress/ElasticPress.php b/src/Base/ElasticPress/ElasticPress.php index 355e298..a9e47f0 100644 --- a/src/Base/ElasticPress/ElasticPress.php +++ b/src/Base/ElasticPress/ElasticPress.php @@ -232,20 +232,19 @@ protected function formatOutputForElasticsearch(array $item): array */ public function addMappings(array $mapping): array { - $mapping['mappings']['properties'] = [ - 'expired' => [ - 'type' => 'object', - 'properties' => [ - 'on' => [ - 'type' => 'object', - 'enabled' => 'false' - ] + $mapping['mappings']['properties']['expired'] = [ + 'type' => 'object', + 'properties' => [ + 'on' => [ + 'type' => 'object', + 'enabled' => 'false' ] ], - 'post_date_gmt' => [ - 'type' => 'date', - 'format' => 'yyyy-MM-dd HH:mm:ss', - ], + ]; + + $mapping['mappings']['properties']['post_date_gmt'] = [ + 'type' => 'date', + 'format' => 'yyyy-MM-dd HH:mm:ss', ]; return $mapping;