为什么Joomla! K2不支持中文搜索?

时间:2013-01-08 06:28:24

标签: joomla joomla-extensions joomla-k2

我使用K2,但我发现搜索中文没有通过K2搜索模型的结果。 Joomla 3.0.X,K2 v2.6.1

file: /plugins/search/k2/k2.php

   WHERE (";
         if ($pluginParams->get('search_tags') && count($itemIDs))
         {
            JArrayHelper::toInteger($itemIDs);
            $query .= " i.id IN (".implode(',', $itemIDs).") OR ";
        }
        $query .= "MATCH(i.title, i.introtext,    i.`fulltext`,i.extra_fields_search,i.image_caption,i.image_credits,i.video_caption,i.video_credits,i.metadesc,i.metakey) AGAINST ({$text} IN BOOLEAN MODE)
    ) 

替换

  WHERE i.title LIKE $text
                OR i.introtext LIKE $text
                OR i.`fulltext` LIKE $text
                OR i.extra_fields_search LIKE $text
                OR i.image_caption LIKE $text
                OR i.image_credits LIKE $text
                OR i.video_caption LIKE $text
                OR i.video_credits LIKE $text
                OR i.metadesc LIKE $text
                OR i.metakey LIKE $text

但一切都没发生。 如何做一些支持中文搜索的内容?

1 个答案:

答案 0 :(得分:2)

@ray,因为您的问题应该要求对K2进行更改(如果问题确实存在)我建议您查看开发人员论坛http://getk2.org/community/index