Skip to content

Commit

Permalink
Add postdate
Browse files Browse the repository at this point in the history
  • Loading branch information
lenvanessen committed Sep 23, 2022
1 parent db57f86 commit 89c3543
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/services/Indexes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
];
}
Expand Down

0 comments on commit 89c3543

Please sign in to comment.