I’m trying to implement a search functionality on a page. So, I followed this tutorial and it pretty much works as expected.
However, I also want to search the tags
and structure
fields, not only text
and title
. To do this, I thought that I just needed to change the following line:
$results = $site->index()->visible()->search($query, 'title|text|tags|structure');
But for whatever reason this won’t work. What am I doing wrong?