namespace BookStack\Search;
-use BookStack\Actions\Tag;
+use BookStack\Activity\Models\Tag;
use BookStack\Entities\Models\Entity;
use Illuminate\Support\HtmlString;
* Update the given entity model to set attributes used for previews of the item
* primarily within search result lists.
*/
- protected function setSearchPreview(Entity $entity, SearchOptions $options)
+ protected function setSearchPreview(Entity $entity, SearchOptions $options): void
{
$textProperty = $entity->textField;
$textContent = $entity->$textProperty;
- $terms = array_merge($options->exacts, $options->searches);
+ $relevantSearchOptions = $options->exacts->merge($options->searches);
+ $terms = $relevantSearchOptions->toValueArray();
$originalContentByNewAttribute = [
'preview_name' => $entity->name,