...
|
...
|
@@ -55,14 +55,16 @@ class BulkData { |
|
|
*/
|
|
|
public function toParams():array {
|
|
|
$params = [];
|
|
|
foreach ($this->data as $index=>$item){
|
|
|
$params[] = [
|
|
|
'index' => [
|
|
|
'_index' => $index,
|
|
|
'_id' => $item['_id']
|
|
|
]
|
|
|
];
|
|
|
$params[] = $item['_source'];
|
|
|
foreach ($this->data as $index=>$items){
|
|
|
foreach ($items as $item){
|
|
|
$params[] = [
|
|
|
'index' => [
|
|
|
'_index' => $index,
|
|
|
'_id' => $item['_id']
|
|
|
]
|
|
|
];
|
|
|
$params[] = $item['_source'];
|
|
|
}
|
|
|
}
|
|
|
return $params;
|
|
|
}
|
...
|
...
|
|