欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

使用了 apachesolr solr 后 出现了分类无法查找,即搜索了选择了某分类 taxonomy term 但仍然搜索了全部 自己亲自做的 有大用 有大大用


(因为发觉到 此时 (  http://shipingzhong.cn/search/site/m3u8%20%E6%9C%89%E5%A4%A7%E7%94%A8?fq%5B0%5D=bundle%3Astory&fq%5B1%5D=im_taxonomy_vocabulary_1%3A29 )  $params 当中 没有了 fq 这里加上 fq 吧 (不知道为什么没有,反正这么改,肯定行))

   在 Drupal_Apache_Solr_Service 的大约 932 行的下面 增加如下代码:

foreach($_GET['fq'] as $fq)
{
 foreach($params['fq'] as $exist_fq){
   if(stripos($exist_fq, $fq) === FALSE){
     $params['fq'][] = $fq;
   }
 }
}


image.png

普通分类: