if (empty($tables)) { return null;
} $query =
$this->
buildQueryFromKeywords($keywords,
$tables);
$this->
addToleranceCondition($query);
$query->
select( [ 'a.id as product_id',
'(' .
$this->
getRelevanceSelection() . ') as ranking',
] );
$enableAndSearchLogic =
$this->config->
get('enableAndSearchLogic', false
);
if ($enableAndSearchLogic) { $this->
addAndSearchLogic($query,
$term);
} return $query;
}