Indeed, only the product name and product description are used for the search plugin.
If you want to add the keywords in the search, you should edit the file plugins/search/hikashop_products.php and
after the line:
$filters[] = "a.product_description LIKE ".$text;
add a line:
$filters[] = "a.product_keywords LIKE ".$text;
and change the code:
$wordFilters = array();
$subWordFilters1 = array();
$subWordFilters2 = array();
$wordFilters2 = array();
foreach ($words as $word) {
$word = $db->Quote( '%'.$db->getEscaped( $word, true ).'%', false );
$subWordFilters1[] = "a.product_name LIKE ".$word;
$subWordFilters2[] = "a.product_description LIKE ".$word;
if($multi){
$wordFilters2[] = "b.value LIKE ".$word;
}
}
$wordFilters[0]= '(' .implode( ($phrase == 'all' ? ') AND (' : ')
OR ('),$subWordFilters1). ')';
$wordFilters[1]= '(' .implode( ($phrase == 'all' ? ') AND (' : ')
OR ('),$subWordFilters2). ')';
$filters[] = '(' . implode( ') OR (', $wordFilters ) . ')';
if($multi){
$filters2[] = '(' . implode( ($phrase == 'all' ? ') AND (' : ')
OR ('), $wordFilters2 ) . ')';
}
to:
$wordFilters = array();
$subWordFilters1 = array();
$subWordFilters2 = array();
$subWordFilters3 = array();
$wordFilters2 = array();
foreach ($words as $word) {
$word = $db->Quote( '%'.$db->getEscaped( $word, true ).'%', false );
$subWordFilters1[] = "a.product_name LIKE ".$word;
$subWordFilters2[] = "a.product_description LIKE ".$word;
$subWordFilters3[] = "a.product_keywords LIKE ".$word;
if($multi){
$wordFilters2[] = "b.value LIKE ".$word;
}
}
$wordFilters[0]= '(' .implode( ($phrase == 'all' ? ') AND (' : ')
OR ('),$subWordFilters1). ')';
$wordFilters[1]= '(' .implode( ($phrase == 'all' ? ') AND (' : ')
OR ('),$subWordFilters2). ')';
$wordFilters[2]= '(' .implode( ($phrase == 'all' ? ') AND (' : ')
OR ('),$subWordFilters3). ')';
$filters[] = '(' . implode( ') OR (', $wordFilters ) . ')';
if($multi){
$filters2[] = '(' . implode( ($phrase == 'all' ? ') AND (' : ')
OR ('), $wordFilters2 ) . ')';
}
The problem is that the more fields we add in the search and the longer the queries will take. We need to look at a better solution in the future...