Skip to content

Commit

Permalink
Updated getSearchContent to include SearchTerms
Browse files Browse the repository at this point in the history
Fixes issue when updating content in the CMS the index not being updated correctly
  • Loading branch information
aletail committed May 31, 2024
1 parent 90cf0ed commit 51cf627
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/SearchableExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,17 @@ public function getSearchableSummary()
**/
public function getSearchableContent()
{
return $this->getSearchableSummary();
$content = "";
foreach ($this->owner->SearchTerms() as $term) {
$content .= $term->SearchTermText . " ";
}
if ($this->owner->SearchableExtension_Summary_ColumnName) {
$content .= $this->owner->{$this->owner->SearchableExtension_Summary_ColumnName};
} else {
$content .= $this->owner->Content;
}

return $content;
}
/**
* getSearchableSummaryColumnName
Expand Down

0 comments on commit 51cf627

Please sign in to comment.