...oods_tag_id:'.$kT)->setFacets('goods_tag_id')->search(); $arr1 = $search->getFacets('goods_tag_id'); if($arr1) { foreach ($arr1 as $kx => $vs) { $tagCount[$kT] += $vs; } }else{ $tagCount[$kT] = 0; } } 这样之后还是有误差,无奈之下,在每个循环后面加了个setlimit(1...