Found in assets/snippets/ajaxSearch/classes/search.class.inc.php a place where is defined for example the TV table where to search:
case 'tv':
$this->joined[] = array(
'tb_name' => $this->getShortTableName('site_tmplvar_contentvalues'),
'tb_alias' => 'tv',
'id' => 'id',
'main' => 'id', // main table field used for join
'join' => 'contentid', // joined table field used for join
'searchable' => array('value'),
'displayed' => array('value'), // 'id' and 'join' field added by default
'concat_separator' => ', ',
'filters' => array(),
'jfilters' => array()
);
$j = count($this->joined) - 1;
if ($pfields != '' ) {
unset($this->joined[$j]['searchable']);
if ($pfields == 'null' or $pfields == 'NULL') $this->main['searchable'] = array();
else $this->main['searchable'] = explode(',',$pfields); // overwrite the default values
}
// tv concatenation with allowed tv name only
if ($this->cfg['withTvs']) {
$wtv = $this->getListTvs($this->cfg['withTvs']);
$this->joined[$j]['jfilters'][] = array(
'tb_name' => $this->getShortTableName('site_tmplvars'),
'tb_alias' => 'tmpl',
'main' => 'tmplvarid',
'join' => 'id',
'field' => 'name', // 'id' and 'join' field added by default
'oper' => $wtv['oper'],
'value' => $wtv['list']
);
}
break;
So, I thought for the beginning I should create below that code similar code to search from table "posts" with prefix "wp" but bit confusing is that in Wordpress there isn’t field "searchable" so the code shouldn’t check weather the post is searchable or not.
Anyway, if someone has tried it before, please post the code how to do it.
Regards,
Kaspar