Skip to content

Commit

Permalink
feat: add category name to full-text content
Browse files Browse the repository at this point in the history
  • Loading branch information
sitepark-veltrup committed Feb 15, 2024
1 parent c40d02d commit 6222660
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,12 @@ private function enrichContent(
$contactPoint = $resource->getData()->getArray('metadata.contactPoint');
$content[] = $this->contactPointToContent($contactPoint);

/** @var array<array{name?:string}> $categories */
$categories = $resource->getData()->getArray('metadata.categories');
foreach ($categories as $category) {
$content[] = $category['name'] ?? '';
}

$cleanContent = preg_replace(
'/\s+/',
' ',
Expand Down

0 comments on commit 6222660

Please sign in to comment.