Multisearch - Force Ignore records

2 posts by 2 authors in: Forums > CMS Builder
Last Post: February 23, 2016   (RSS)

By Perchpole - February 22, 2016

Hello, All -

Is it possible to force Multisearch to ignore records?

I want to prevent the search from returning records which have a particular value set. The search code looks like this:

$searchTables = array();
$searchTables['pages'] = array(
'viewerUrl' => 'index.php',
'titleField' => 'name',
'summaryField' => 'content',
'field3' => 'permalink',
'field4' => 'onNav',
'searchFields' => array('name','content','footnote'),
);

I want the search to ignore records which have the "onNav" value of "0" (checkbox).

I can do this on the list page by filtering the results:

<?php if(@$listRecord['field4'] == "0") {continue;} ?>

...but it's ugly - especially as the number of results indicated in the search info will be higher than those listed on the page!

What can I do?

:0/

Perchpole