Hi!
I have defined the following field definition for my own search controller.
$results = $site->search($query, 'title|**Middle_Tab_Description**');
But the search is not working with this individual field “Middle…”. What do I wrong here?
Hi!
I have defined the following field definition for my own search controller.
$results = $site->search($query, 'title|**Middle_Tab_Description**');
But the search is not working with this individual field “Middle…”. What do I wrong here?
Why do you put asterisks around the field name?
This was an example only…here is my code… and Middle_Tab_Description can not be searched…I also would like to enhance the range of custom fields here, but the first fields is still a problem…
<?php
return function($site, $pages, $page) {
$query = get(‘q’);
$results = $site->search($query, ‘title|Middle_Tab_Description’);
return array(
‘query’ => $query,
‘results’ => $results,
);
};
Try with small letters, middle_tab_description
That’s it. Works fine now! THANK YOU so much!!