Exemplo n.º 1
0
 public static function search_batch_words_all($wd, $offset, $size, array $condition = array())
 {
     $total = 0;
     $ret_list = array();
     $explain_words = array($wd);
     if (!empty($wd)) {
         $search_result = SearchHelper::Search_batch($wd, 'index_9939_com_v2_keywords_all', $offset, $size, $condition);
         if (isset($search_result) && !empty($search_result)) {
             $arr_ids = array();
             $wd_obj = new KeyWords();
             foreach ($search_result as $search) {
                 if (isset($search['matches']) && !empty($search['matches'])) {
                     $arr_ids = array_merge($arr_ids, array_keys($search['matches']));
                 }
             }
             $ret_list = $wd_obj->List_ByIds($arr_ids);
             //$total = $search_result['total'];
         }
         $explain_words = $search_result['explain_words'];
     }
     return array('list' => $ret_list, 'explain_words' => $explain_words);
 }