diff --git a/src/services/Indexes.php b/src/services/Indexes.php index a5ab49e..4107f05 100644 --- a/src/services/Indexes.php +++ b/src/services/Indexes.php @@ -461,13 +461,14 @@ public function buildMapping(): array $mapping = []; $predefinedAttributes = [ - 'title', - 'slug', + 'title' => 'text', + 'slug' => 'text', + 'postDate' => 'date' ]; - foreach ($predefinedAttributes as $attribute) { + foreach ($predefinedAttributes as $attribute => $type) { $mapping[$fieldPrefix . 'attribute_' . $attribute] = [ - 'type' => 'text', + 'type' => $type, 'analyzer' => 'standard', ]; }