From 48da345f231cfd46b16c1e85dd2799b225518dd5 Mon Sep 17 00:00:00 2001 From: Oleksandr Zhyian Date: Thu, 19 Dec 2024 12:50:14 +0200 Subject: [PATCH] feat: include keywords in searchable content --- CHANGELOG.md | 4 ++++ src/Infrastructure/Search/SearchableContentUpdater.php | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5540ea9..8fa2756 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Keywords are indexed for searching. + ## [2.1.0] - 2024-09-06 ### Added diff --git a/src/Infrastructure/Search/SearchableContentUpdater.php b/src/Infrastructure/Search/SearchableContentUpdater.php index fc64069..5f4a247 100644 --- a/src/Infrastructure/Search/SearchableContentUpdater.php +++ b/src/Infrastructure/Search/SearchableContentUpdater.php @@ -84,6 +84,7 @@ private function buildSearchableContent( $rawView->title()->asString($languageCode), $rawView->subtitle()->asString($languageCode), $rawView->content()->about()->description()->asString($languageCode), + ...array_values($rawView->keywords()->asArrayOfStrings($languageCode)->getArrayCopy()), ]; return implode(' ', $parts);