Forum

Thread tagged as: Question

Search: Only search certain areas, set listing priority

Is it possible to have more control over search? I'd like to be able to only search certain areas, and prioritize some fields over others i.e.

$query = perch_get('q');
perch_content_search($query, array(     
    'from-path'=> array('/somepage', '/anotherpage'),
    'template'=>'search-result.html'
));
Brad Cerasani

Brad Cerasani 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You can only specify one value for from-path currently.

What do you mean by prioritise fields?

I have two fields on a page, one for partners at a firm and another for admin staff/assistants. Currently, if I search for one of the partner's names their assistant shows up first.

Drew McLellan

Drew McLellan 2638 points
Perch Support

The search isn't that sophisticated, I'm afraid. That's quite a complex requirement.