... $doc->addTerm('cid', $node->getId()); } } 搜索 $search->setFacets(array('cid'), true); $search->search(); $counts = $search->getFacets('cid');
...arr1 =array(); $search->setQuery($queryTagFace.' AND goods_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; } } 这样之后还是有误差,...