$client = ClientBuilder::create()->build(); $list = $db->execute("select * from user limit 100"); if(!$list) { echo "完成"; break; } $params['body'] = array(); foreach($list as $info) { $params['body'][] = array( 'index' => array( '_index' => 'kd_smt_item_variations', '_type' => 'kd_smt_item_variations', '_id' => $info['smtv_id'] ) ); $params['body'][] = $info; $last_id = $info['smtv_id']; } $response = $client->bulk($params);
08-16