Hello, I have successfully installed the SiteSearch plugin and it is working as it should. However, I was unable to display the ‘publish_up’ field in the results in ‘meta’. I think the documentation is not very clear about this.
In Plugin.php:
return [
‘title’ => $item->article_title,
‘text’ => $item->content,
‘url’ => $controller->pageUrl(‘/’).‘materias/’.$item->slug, //‘materias’, [‘slug’ => $item->slug]
//‘thumb’ => optional($item->images)->first(), // Instance of System\Models\File
‘relevance’ => $relevance, // higher relevance results in a higher
// position in the results listing
‘meta’ => [
‘publish_up’ => $item->publish_up
],
// ‘meta’ => ‘data’, // optional, any other information you want
// to associate with this result
// ‘model’ => $item, // optional, pass along the original model
];