} else { # 没有产品id时的情况 //var_dump($docArr1_2); exit('163_3'); $docArr1_2 = is_array($res1_0) ? array_keys($res1_0) : array(); } } else { # 第一优先级规则取出的数据足够36条 $docArr1_2 = is_array($res1_0) ? array_keys($res1_0) : array(); } if (is_array($docArr1_2)) { $num = count($docArr1_2); } #var_dump($docArr1_2);exit('#159_1#'); //$num < 36 if ($num < $needNum) { $lookDocIdArr = get_docid_by_lookmore($docArr, $needNum - $num, $unArr); //$lookDocIdArr = array_keys($lookMoreDocId); $docArr1_2 = array_merge($docArr1_2, $lookDocIdArr); //var_dump($lookDocIdArr,$docArr1_2);exit('#164_3#'); # 先对第一优先级规则的docId,获取title等相关文章信息 $fResult_1 = array(); if ($num >= 0) { #var_dump($docArr1_2);exit('#169#'); # part1 $fResult_2 = get_data_by_docid($docArr1_2); // array(5255718=>array('document_id'=>....)) # 按照原始的id顺序 排回 foreach ($docArr1_2 as $key => $value) { $fResult_1[$value] = $fResult_2[$value]; } }
$addNum = $dataNum - (int) $docNum; $docArr1_2 = get_docid_by_lookmore($docArr, $addNum, $unArr); } elseif (!isset($proNoIdFlag)) { $docArr1_2 = array(); } if (isset($docArr1_1_1)) { $docArr1_1_1 = array_keys($docArr1_1_1); $docArr1_2 = array_keys($docArr1_2); $docArr1_2 = array_merge($docArr1_1_1, $docArr1_2); } else { $docArr1_2 = array_keys($docArr1_2); } $docArr1_2 = array_values($docArr1_2); #var_dump($docArr1_2); exit('144_3'); } else { $docArr1_2 = get_docid_by_lookmore($docArr, $dataNum - $num0); // 52346513=>324 # 如果第一优先级有数据,则进行补全,数组合并,一共36条 if ($num0 > 0) { $docArr1_2 = $res1_0 + $docArr1_2; } $docArr1_2 = array_keys($docArr1_2); } } else { # 第一优先级规则取出的数据足够 $docArr1_2 = is_array($res1_0) ? array_keys($res1_0) : array(); #var_dump($docArr1_2); exit('156_3'); //exit('158'); } if (is_array($docArr1_2)) { $num = count($docArr1_2);